Skip to content

wolfgangihloff/peergroup-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Peergroup Supervision node server

Node server for rails application

Development

Install node.js. You can use Node Version Manger for this.

Next install Node Package Manager

Install required packages:

npm install

Run node server:

node server.js

Test

To run specs from rails app you need to run node:

REDIS_DB=1 PGS_PORT=3666 node server.js

REDIS_DB should be number that you specified in config/redis.yml in rails app test group.

You can update node packages by changing versions in package.json file and running:

npm update

Deploying

Heroku

It's possible to run node server on heroku.

To have your own instance on heroku:

  1. Install heroku client
gem install heroku
  1. Create application
heroku create --stack cedar my-peergroup-node-app-name
  1. Setup configuration variables
heroku config:add PGS_HOST=example.com PGS_PORT=80 PGS_USERNAME=node PGS_PASSWORD=secret REDISTOGO_URL=redis.url
  • PGS_HOST - address of rails application
  • PGS_USERNAME/PGS_PASSWORD - credentials for connecting to rails app
  • REDISTOGO_URL - redis url taken from rails app
  1. Deploy code
git push heroku master
  1. Run web process
heroku ps:scale web=1

Refer to heroku docs for more informations.

License

MIT License. Copyright © 2011 Wolfgang Ihloff

About

node code for peergroup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published