- Install
nodeand Docker - Run
npm install -g yarnto installyarn - Run
yarnin 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.exampleand rename it to.env. This will contain the environment variables for the app. - Run
docker-compose up -din the project directory to start the services (eg. database) that the backend needs to run. - Run
yarn devto start the development server
- To run scripts written in Typescript, do
yarn ts-node {script_name}
- Run
NODE_ENV=test yarn sequelize-cli db:createto 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,
cdintodocsdirectory- Export postman collection as
v2.1 - Run
docgen build -i dk-api.postman_collection.json -m -o api-doc.mdwith updated postman collection