Skip to content

Commit a75d96a

Browse files
authored
Merge pull request #154 from tcet-opensource/54-update-the-documentation-for-the-project
#54 update the documentation for the project
2 parents e3b47f6 + e360bf7 commit a75d96a

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,38 @@ All the dependencies used in this project will be listed in the `package.json` f
1212

1313
## Installation
1414

15-
To start working on this project, follow the steps given above until you complete Step 4, then make a MongoDB Atlas database, get the connection URI, and save it as `DB_URL` in your `.env` file. Also, make sure to use
15+
To start working on this project first you need to create `.env` file. This .env file will contain:
16+
17+
`PORT`
18+
You can set it on any port number you want. `eg: 4000`
19+
20+
`TOKEN_SECRET` which you will get by running following line in terminal
1621
```
1722
node -e "console.log(require('crypto').randomBytes(256).toString('base64'));
1823
```
19-
to generate a token secret that you will use for JWT authentication, save it as `TOKEN_SECRET` in your `.env` file.
24+
`ENVIRONMENT`
25+
Set this on 'local'
26+
27+
`DB_URL`
28+
For this parameter you will need to open your account on MongoDB Atlas, don't forget to note down you account password, then create new cluster and through that you will get your connection string which will be your DB_URL in .env, make sure instead of "password" in connection string, you enter your own account password.
29+
30+
`EMAIL_HOST`,
31+
`EMAIL_PORT`,
32+
`EMAIL_USER`,
33+
`EMAIL_PASS`
2034

21-
Once you are done with this, install the packages through `npm i` and run the server with `npm run serverstart` or `npm run serverstartWin` depending on your operating system.
35+
For these above parameters, first you need to open an account on any SMTP server, we use mailtrap, then start testing where you will see show credentials in which you will get all the values we need which are host, port, username and password.
36+
37+
You don't need to assign values to these parameters in double or single quotes, just write directly, .env automatically converts it into quoted string.
38+
39+
Once you are done with this, install the packages through `npm ci` which stands for clean install.
40+
Also, you need to run 'setup.js' file. You can do that by running following command in your terminal
41+
```
42+
node setup.js
43+
```
44+
And finally, run the server with `npm run serverstart` or `npm run serverstartWin` depending on your operating system.
2245

23-
## Contributing
46+
## How to Contribute
2447

2548
1. Choose an issue, bug, exploit, or feature to work on: Start by identifying an issue or feature in the repository that you would like to work on. If you can't find an existing issue or feature, you can create a new one.
2649

0 commit comments

Comments
 (0)