This is a boilerplate for creating an api server. Please follow the install instructions below:
Step 1: Clone the Repo
git clone https://github.com/guns2410/boilerplate-api-server.git <folder_name>
Step 2: cd
into the repo
cd <folder_name>
Step 3: Install dependencies
npm install
OR
yarn install
Step 1: Create an api endpoint
Write your API Endpoint business logic in
./src/api/<filename>.js
Step 2: Add to index.js
file for import management
Step 3: Map the file with a URL in <root_dir>/index.js
For running the server in DEV mode
npm run dev
OR
yarn dev
Running in production
npm start
OR
yarn start
For running tests
npm test
OR
yarn test
For test coverage
npm run test:coverage
OR
yarn test:coverage