Following are the steps which should get you started.
-
NodeJS & npm
-
MongoDB community server
-
Localhost CA certificate
-
.env file, see .sample.env
-
custom config/config.json - all config keys signed with a custom ssh key from custom .env file.
-
MongoDB compass
-
Commitizen (follow instructions)
-
NodeJS can be installed from the official website. Make sure that you're able to run node as well as npm command via your terminal.
-
MongoDB community server can be downloaded from the official website. Then make sure the database server runs on mongodb://localhost:27017/.
-
To generate localhost .pem files locally in project folder, mkcert can be used. Follow the instructions provided in their repository, and generate localhost.pem & localhost-key.pem in project root.
-
.env file provides environment variables for local server. This can be created manually following the pattern in .sample.env and obtaining values from repository secret, or by asking the owner to provide it to you.
-
config/config.json can be generated using
npm run newconfig
. See README for more details on this.
git clone <GIT_REPOSITORY_LINK>
npm install
Follow config keys generation steps from README.md.
npm test
Should pass all tests.
npm run devserver
Console must log
Connected to <YOUR_DATABASE_NAME>
listening on 3000 (https)
Navigate to https://localhost:3000/ in your browser. The webapp should get running.
In case the server fails to run, go through all the steps carefully, specially the steps for .pem certificate generation and .env file. Also make sure the mongodb community server is running on the required port before you start the node server.
git checkout -b <YOUR_BRANCH_NAME>
Keep the branch name descriptive to the changes you're about to make.
The details of project are thouroughly discussed in DOCUMENTATION.md and can be referred.
It is advisable to break server before moving on to VCS.
If you have installed commititzen (cz command is enabled on your system), then you can run the following command.
npm run commit
The above command executes the following commands sequentially.
npm test
git status
git add .
git status
git cz
If git cz
throws any error, then you can always proceed with git commit
. However, do run npm test
before commiting any changes.
git pull
git push -u origin <YOUR_BRANCH_NAME>
Create pull requests with proper description of updates and changes made.