From 80449565cc7ee3bcd7116799833b2392780891ea Mon Sep 17 00:00:00 2001 From: Tibz-Dankan Date: Fri, 6 Sep 2024 13:56:41 +0300 Subject: [PATCH] Update readme file --- README.md | 95 +++++++++++++++++++++++++++++++++++++-- internal/assets/logo.png | Bin 0 -> 9012 bytes 2 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 internal/assets/logo.png diff --git a/README.md b/README.md index 67ceba5..d2e2da7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,93 @@ -# keep-active +

+ + + Appcrons + + Appcrons + +

-Keep-Active is an application mean't to maintain backend severs hosted on platforms like render.com, to keep running all the time without being spined. -This happens by making http requests to backend server basing on a specific time interval +
+

+ Appcrons optimizes the uptime of your free backend instance on Render by sending automated requests, preventing it from shutting down due to inactivity. +

+
+ +## Documentation + +For full documentation, visit [appcrons.netlify.app](https://appcrons.netlify.app). + +## Installation + +To install the Appcrons backend repo locally, follow these steps: + +### Prerequisites + +- Ensure you have **Golang 1.23** installed. You can download it from [go.dev/doc/install](https://go.dev/doc/install). +- Ensure you have **Postgresql 15** installed. You can download it from [postgresql.org/download](https://www.postgresql.org/download/). +- Ensure you have **Redis** installed. You can download it from [redis.io](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/). + +- Ensure your computer system supports **Makefiles** . If you are windows, follow this guide [Run Makefile on windows](https://medium.com/@samsorrahman/how-to-run-a-makefile-in-windows-b4d115d7c516). + +### Steps + +1. **Clone the repository**: + + ```sh + https://github.com/Tibz-Dankan/appcrons.git + + cd appcrons + ``` + +1. **Install packages**: + + ```sh + make install + + ``` + +1. **Set up environmental variables**: + +| Variable | Type | Description | +| ------------------- | ------ | -------------------------------------------- | +| `APPCRONS_TEST_DSN` | string | DSN pointing to test postgres db | +| `APPCRONS_DEV_DSN` | string | DSN pointing to development postgres db | +| `APPCRONS_STAG_DSN` | string | DSN pointing to staging or CI/CD postgres db | +| `APPCRONS_PROD_DSN` | string | DSN pointing to production postgres db | +| `REDIS_URL` | string | URL pointing to your redis instance | +| `JWT_SECRET` | string | key used to sign JWT tokens | + +create .env file in the root project directory and add all these variables + +_Example_ + +```sh + +APPCRONS_DEV_DSN="host=localhost user=postgres password= dbname= port= sslmode=disable" + +``` + +4. **Start the application**: + + ```sh + + make run + ``` + +5. **Run tests in devlopment**: + + ```sh + + make test + + ``` + +6. **Run tests in staging**: + + ```sh + + make stage + + ``` + +> Note: The application server port is **8080** diff --git a/internal/assets/logo.png b/internal/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9be6e9566c92171b74a3b80db623bdcdabc3b1a3 GIT binary patch literal 9012 zcmV-4Bg@>0P)PyA07*naRCr$Pd-&al#N_C+y1qbzz+H;I8`aceO36R*A89 z#h6szOUYKOU8_CU*%_Ux@9~rZcU4D+IXFFP=?(lps+jWp{UiP7>xKL*I2v@@0=Eo> zV;F`AJsAcBlyz#&UbyZ{JL8K*xoa4={Ru(^&f zh~bL}xk4VLkx>}TK%N=!dWO*=^!0VFb^q2cJ=k}$t@)&byY$K1S_i`7!)D&TpsWd0 zGa5V*!p!6l1TMI)!?FyxBcssrS;SG8V8R&2B7~F)*fe@W1F9~px(4{eqp&RpaVTKh zHX=VlRP|7hCfHEvZ)ft%4O_1`c_5!Oa94C(Xm8Iue-%v6e5qmza7TwUGZ$CzBkT`Sd;g)1*{> zRSE%(aR@KnLktN~vvkJQ^>xW%RAV$V3&q|0M`swh zk8Z#Akrz)Sz$X^mRjahtvzu?uE^fQKCn_OyI3gKBIZKL6QUFW?1Oc2*_0-2w!bKm^ z_*;R?2~&i04L|{_fG2Ov7zF*1o-U>f(eF5w+-I#j?dD8S+fmSe+XF_|DZ86M$Ee^wY18024B@>N-P8r0}_>PLDp zi4WEw)j3i!^_74<%#Vy^8c`SmG67#k5gN2C_>TT(^CkaNdpe()^7QS5fV=$0&t_k5 z)}J>P&p5MeGr%iD%jJL|f=&Q4hDZuTGKNl$fH5%65pyy$3RG#ZQYJ~$It4d%u?jqL zxb(SLC<9fWsJ)cLc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