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 installOR
yarn installStep 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 devOR
yarn devRunning in production
npm startOR
yarn startFor running tests
npm testOR
yarn testFor test coverage
npm run test:coverageOR
yarn test:coverage