Appcrons optimizes the uptime of your free backend instance on Render by sending automated requests, preventing it from shutting down due to inactivity.
For full documentation, visit appcrons.netlify.app.
To install the Appcrons backend repo locally, follow these steps:
-
Ensure you have Golang 1.23 installed. You can download it from go.dev/doc/install.
-
Ensure you have Postgresql installed. You can download it from postgresql.org/download.
-
Ensure you have Redis installed. You can download it from redis.io.
-
Ensure your computer system supports Makefiles . If you are on windows, follow this guide Run Makefile on windows.
-
Clone the repository:
https://github.com/Tibz-Dankan/appcrons.git cd appcrons
-
Install packages:
make install
-
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
APPCRONS_DEV_DSN="host=localhost user=postgres password=<db password> dbname=<db name> port=<db port> sslmode=disable"
-
Start the application:
make run
-
Run tests in devlopment:
make test
-
Run tests in staging:
make stage
Note: The application server port number is 8080