Skip to content

Latest commit

 

History

History
53 lines (43 loc) · 2.25 KB

README.md

File metadata and controls

53 lines (43 loc) · 2.25 KB

Snowparking :: API

Receives emails from the city when a snow emergency occurs, and provides an API for the front endto easily know snow emergency statuses.

VMS Easy setup development environment

Use these instructions to setup a temporary* development environment of this project.

  1. Fork this repository
  2. Create a new Virtual Machine >> SSH in >> Run vms quick install:
  3. export GHUSER='AnthonyAstige' (Replace AnthonyAstige with your username)
  4. curl -L -o- https://rawgit.com/codeforeauclaire/snowparking/master/api/vmsinstall.sh | bash && source ~/.nvm/nvm.sh
  5. Run api app
  6. (cd ~/snowparking/api/bin && ./serve-node)
  7. Load http://{vms-ip}:3050/status in your browser
  8. Edit a file to see changes in your browser instantly

*For a permanent development environment we recommend you read the referenced script above to install locally.

Production setup instructions

I'm probably doing this wrong. I'm used to Meteor.js and not sure standards around raw node.js projects - Anthony May 2016

  1. Setup server
  2. Make free tier Ubuntu server with AWS
  3. sudo apt-get update
  4. sudo apt-get install nodejs
    1. May need to run sudo ln /usr/bin/nodejs /usr/sbin/node StackOverflow Reference
  5. sudo apt-get install npm
  6. sudo apt-get install mongodb
  7. Get code on server
  8. ./deploy
  9. Setup app
  10. cd api
  11. npm install express --save
  12. npm install --save body-parser
  13. npm install mongo --save
  14. npm install moment --save
  15. npm install moment-timezone --save
  16. sudo npm link mongodb (Seemed to have helped StackOverflow Reference)
  17. Run
  18. cd api
  19. ./serve-mongo (Will error if not needed / already running)
  20. ./serve-node
  21. Configure server
  22. Open up port 3000 as needed StackOverflow post
  23. Confirm running
  24. Go to http://localhost:3000

TODO

  1. Finish implementing SPECS.md
  2. Cleanup all the bin files to be more coherent