epfl.polls is a basic on-line poll/survey application written in node.js with express, jade, stylus, passport and some other useful package.
$ git clone https://github.com/domq/epfl.polls.git
$ cd epfl.polls
$ npm install
$ node bin/www
Installation note: change the first command with the following if you just want to get the latest tagged version, with no branches and no history:
$ git clone --branch v0.9 --depth 1 --single-branch https://github.com/domq/epfl.polls.git
If you are using WebStrom you have to configure file watchers for Jade and Stylus.
File > Settings... > Tools > File Watchers
File type: Jade
Scope: Project Files
Program: $ProjectFileDir$/node_modules/jade/bin/jade.js
Argument: $FileName$
Working Directory: $FileDir$
Output paths to refresh: $FileNameWithoutExtension$.html
File type: Stylus files
Scope: Project Files
Program: $ProjectFileDir$/node_modules/stylus/bin/stylus
Argument: -u nib $FileName$
Working Directory: $FileDir$
Output paths to refresh: $FileNameWithoutExtension$.css
In your Project File Dir create the DB directory
mkdir mydb
then, launch the mongod service
mongod --dbpath mydb
Now you can launch the app
node bin/www
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
events.js:85
throw er; // Unhandled 'error' event
- check mongod is running
- check bson and node-gyp are installed
Check http://stackoverflow.com/questions/21656420/failed-to-load-c-bson-extension
Check that there are no other node server on the same port
lsof -i:3000
And kill it if there is one.
https://help.github.com/articles/syncing-a-fork/
git remote add upstream https://github.com/domq/epfl.polls.git
git fetch upstream
git checkout master
git merge upstream/master