/nodejs-against-humanity

Cards Against Humanity implemented using NodeJS

Primary LanguageJavaScriptOtherNOASSERTION

##NodeJS Against Humanity

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic License.

NodeJS implementation of Cards Against Humanity. Here's a screenshot:

##Run Locally

Install all the dependencies:

npm install (you may need to prefix this with sudo if you're on Mac)

Run the app:

node server.js

Then navigate to http://localhost:3000

#####If you want tests to execute every time you change a file:

  1. Install jasmine-node:
npm install jasmine-node -g
  1. Run:
jasmine-node ./spec/describe_Game_spec.js --autotest --watch ./game.js

#####To run the end-to-end tests you first must install protractor.

Then run:

protractor e2e-test/e2econf.js

This will launch an instance of Chrome browser and execute the tests.

#####If you want the server to load up everytime you change the back end:

npm install -g nodemon

Then run the following instead of node server.js:

nodemon server.js

##Signing up, and deploying to Heroku

###Documentation

From heroku.com, click Documentation, then click the Getting Started button, then click Node.js from the list of options on the left...which will take you here: https://devcenter.heroku.com/articles/nodejs

Install Heroku toolbelt from here: https://toolbelt.heroku.com/

Sign up via the website (no credit card required).

Login using the command line tool:

heroku login

Create your heroku app:

heroku create

Git deploy your app:

git push heroku master

Open the app (same as opening it in the browser):

heroku open

And your app should be up on Heroku.