- Install
node
and Docker - Run
npm install -g yarn
to installyarn
- Run
yarn
in the working directory to install required packages - Use the linter files provided to ensure consistent code style across the repository
- Create a copy of
.env.example
and rename it to.env
. This will contain the environment variables for the app. - Run
docker-compose up -d
in the project directory to start the services (eg. database) that the backend needs to run. - Run
yarn dev
to start the development server
- To run scripts written in Typescript, do
yarn ts-node {script_name}
- Run
NODE_ENV=test yarn sequelize-cli db:create
to create test database after postgres is up
- Add breakpoints to the files
- Run
yarn test:debug {test_file_name}
in VSCode's integrated terminal, it should be waiting for a debugging client to connect to its process - Attach the VSCode debugger to the node process by opening the command palette and searching for "Attach to Node process"
To generate API docs,
cd
intodocs
directory- Export postman collection as
v2.1
- Run
docgen build -i dk-api.postman_collection.json -m -o api-doc.md
with updated postman collection