Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stratigos/express-cities

NodeJS Example App
https://github.com/stratigos/express-cities

Last synced: about 1 month ago
JSON representation

NodeJS Example App

Awesome Lists containing this project

README

        

Example Node JS application that allows CRUD operations on a "City" resource.

* to run tests: `npm test`
* `./bin/www` to run app

#### Heroku

If using heroku, then run the following commands:

* `heroku create`
* `heroku info` to get name of app on heroku
* `git remote add heroku [email protected]:HEROKUAPPNAME.git` (TODO check on actual command arg structure)
* `git push heroku master` to deploy app to heroku environment
* `heroku config:add NODE_ENV=production` for environment specification (determines redis datastore number)
* `heroku ps:scale web=1` to create single free tier webserver
* `heroku open` to view app on heroku server

#### Redis
* for production heroku server, use `heroku addons:add redistogo:TIERNAME` from local cli
* for local testing, use `redis-server`