- Download and install the latest version of node 16 for your operating system
- Install git:
- Authenticate your Github account with Git:
- Clone this repo using your command line
git https://github.com/worddangler/backend.git
- Setup env variables
- navigate to the project directory you cloned
- in the root of the project, create a plain text file called
.env
- in the
.env
file you just created, paste the following:DOMAIN=localhost SERVER_PORT=8000 CLIENT_PORT=3000
- Build and run:
- in your command line, run
npm install
to install all of the project dependencies - run with
npm run start
- in your command line, run
- When you start working on the repo don't contribute to the main branch directly. Instead create a fork, work on your own fork, and open a Pull Requests when you are ready to contribute code.
- All Pull Requests require approval from another person in the dev team. You have been added to the dev team if you already joined the org
- All Pull Requests have been set to automatically run continuous integration / continuous development workflows. So when you create a Pull Requests, your code will automatically be tested for linting issues and logic issues that have implemented tests.
Here is an example of a run: https://github.com/worddangler/backend/actions/runs/4476550524
- We are using Jest for tests: https://jestjs.io/
- We are using eslint for linting: https://eslint.org/
- We are using prettier for formatting: https://prettier.io/
- We are uisng ExpressJS server: https://expressjs.com/
- We are using MongoDB as the database (with the node driver): https://www.mongodb.com/
- You can use any editor / ide.
- Install the prettier plugin for your editor and set it up to auto-fix your code on save. Note that prettier formatting is enforced, so if your code is not formatted to follow prettier rules, you will get linting errors when you make a Pull Request.
- Download and install insomnia for API testing: https://insomnia.rest/