diff --git a/README.md b/README.md index eceed50..d51d265 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,14 @@ Create environment files for both the backend and the frontend before running th ### Backend (`apps/api/.env`) -Create a file at `apps/api/.env` with: +Copy the example environment file and update it with your values: + +```bash +cd apps/api +cp .env.example .env +``` + +Then edit `apps/api/.env` and fill in the required values: ```bash # Required @@ -190,7 +197,7 @@ Alternatively, you can run the API server using Docker. A `Dockerfile` is provid ### Building and Running -1. Make sure you have your `.env` file set up in `apps/api/.env` (see [Backend environment variables](#backend-appsapienv) section above) +1. Make sure you have your `.env` file set up in `apps/api/.env`. You can copy from `.env.example` (see [Backend environment variables](#backend-appsapienv) section above) 2. From the root directory, build the Docker image: diff --git a/apps/api/.env.example b/apps/api/.env.example new file mode 100644 index 0000000..12e24a4 --- /dev/null +++ b/apps/api/.env.example @@ -0,0 +1,32 @@ +# Note: pls don't use values as strings for the below variables, if you wanna run using docker becuase in this case, docker build fails. +# simply use a format like this: name-of-the-variable=variable-value +# for example: PORT=8080 + +# Required +CORS_ORIGINS=http://localhost:3000 +NODE_ENV=development +PORT=8080 + +DATABASE_URL=postgresql://USER:PASSWORD@localhost:5432/your_database_name?schema=public +JWT_SECRET=replace-with-a-strong-random-secret + +# compulsory for the project search tool +# Get a PAT from here https://github.com/settings/developers +GITHUB_PERSONAL_ACCESS_TOKEN=token-from-your-github-account + +# for payments +RAZORPAY_KEY_ID=razorpay-key-id +RAZORPAY_KEY_SECRET=razorpay-key-secret +RAZORPAY_WEBHOOK_SECRET=razorpay-webhook-secret + +# to send slack invite. +# it'll be similar to : https://join.slack.com/t/name-of-ur-org/shared_invite/invite-id +SLACK_INVITE_URL=slack-invite-url + +# to send the email (transactional) +# get one from here: https://www.zoho.com/zeptomail/pricing.html?src=pd-menu +ZEPTOMAIL_TOKEN=zeptomail-token + +# key for the encryption +# can be created by running this: echo "$(openssl rand -hex 32)opensox$(openssl rand -hex 16)" +ENCRYPTION_KEY=encryption-key