项目作者: devatsrs

项目描述 :
nodejs api
高级语言: JavaScript
项目地址: git://github.com/devatsrs/neon_nodejs_api.git
创建时间: 2019-03-21T13:00:19Z
项目社区:https://github.com/devatsrs/neon_nodejs_api

开源协议:

下载


SI Neon Nodejs API

Installation

npm install pm2 -g

npm install

pm2 start app.js

Few important commands

- Kill instances
  • sudo killall -9 nodemon
  • sudo killall -9 node
- Start app in background
  • pm2 start app.js

  • pm2 save

  • pm2 startup centos # to start in background even reboot
- Restart app
  • pm2 restart app.js
- Delete/Stop app in background
  • pm2 delete app

Testing

  1. curl -X POST \
  2. http://neon.speakintelligence.com/nodejs/2/route \
  3. -H 'Content-Type: application/json' \
  4. -H 'Postman-Token: 11b970d6-a19f-48f5-98bf-7b75b90f5156' \
  5. -H 'cache-control: no-cache' \
  6. -d '{
  7. "OriginationNo": "442085950856",
  8. "DestinationNo": "44208589657",
  9. "AccountID": 2,
  10. "DateAndTime": "2019-01-21 10:44:00",
  11. "Location": "AM1"
  12. }'

TODO

  • Config file for port and db settings
  • Separate route files
  • Connection close , error fix log.