Rest api for phonebook
- Node v10>= or Docker
- Yarn
git clone --depth 1 https://github.com/osamabari/rest_api
cd rest_apiyarncp .env.example .envyarn devand open http://localhost:3000/v1/status to check api is running or not
Step 1:
yarn docsStep2:
yarn devStep3:
open http://localhost:3000/v1/docs in web browser
Import Phonebook_API.postman_collection.json file in postman to start
yarn start# lint code with ESLint
yarn lint
# try to fix ESLint errors
yarn lint:fix# run all tests with Mocha
yarn test# show logs in production
pm2 logs# generate and open api documentation
yarn docs# run container locally
yarn docker:dev
# run container in production
yarn docker:prod
# run tests
yarn docker:testSet your server ip:
DEPLOY_SERVER=127.0.0.1Replace my Docker username with yours:
nano deploy.shRun deploy script:
yarn deploy