Skip to content

Commit 0d10582

Browse files
authored
Merge pull request #144 from Rehan959/feature/env-example
feat: Add .env.example file for easier developer setup
2 parents 12eb954 + 7c5afda commit 0d10582

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,14 @@ Create environment files for both the backend and the frontend before running th
5858

5959
### Backend (`apps/api/.env`)
6060

61-
Create a file at `apps/api/.env` with:
61+
Copy the example environment file and update it with your values:
62+
63+
```bash
64+
cd apps/api
65+
cp .env.example .env
66+
```
67+
68+
Then edit `apps/api/.env` and fill in the required values:
6269

6370
```bash
6471
# Required
@@ -190,7 +197,7 @@ Alternatively, you can run the API server using Docker. A `Dockerfile` is provid
190197

191198
### Building and Running
192199

193-
1. Make sure you have your `.env` file set up in `apps/api/.env` (see [Backend environment variables](#backend-appsapienv) section above)
200+
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)
194201

195202
2. From the root directory, build the Docker image:
196203

apps/api/.env.example

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# 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.
2+
# simply use a format like this: name-of-the-variable=variable-value
3+
# for example: PORT=8080
4+
5+
# Required
6+
CORS_ORIGINS=http://localhost:3000
7+
NODE_ENV=development
8+
PORT=8080
9+
10+
DATABASE_URL=postgresql://USER:PASSWORD@localhost:5432/your_database_name?schema=public
11+
JWT_SECRET=replace-with-a-strong-random-secret
12+
13+
# compulsory for the project search tool
14+
# Get a PAT from here https://github.com/settings/developers
15+
GITHUB_PERSONAL_ACCESS_TOKEN=token-from-your-github-account
16+
17+
# for payments
18+
RAZORPAY_KEY_ID=razorpay-key-id
19+
RAZORPAY_KEY_SECRET=razorpay-key-secret
20+
RAZORPAY_WEBHOOK_SECRET=razorpay-webhook-secret
21+
22+
# to send slack invite.
23+
# it'll be similar to : https://join.slack.com/t/name-of-ur-org/shared_invite/invite-id
24+
SLACK_INVITE_URL=slack-invite-url
25+
26+
# to send the email (transactional)
27+
# get one from here: https://www.zoho.com/zeptomail/pricing.html?src=pd-menu
28+
ZEPTOMAIL_TOKEN=zeptomail-token
29+
30+
# key for the encryption
31+
# can be created by running this: echo "$(openssl rand -hex 32)opensox$(openssl rand -hex 16)"
32+
ENCRYPTION_KEY=encryption-key

0 commit comments

Comments
 (0)