Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Node.js sample using raw socket.io and nowjs

branch: master
Octocat-spinner-32 config Made using redis optional April 24, 2011
Octocat-spinner-32 public Added redis to the game. Now the messages are stored in redis April 24, 2011
Octocat-spinner-32 views Added code to see application data as an admin April 25, 2011
Octocat-spinner-32 .gitignore added the config to the ignore list April 14, 2011
Octocat-spinner-32 README made it easier to start using the default app.js by providing a start… April 19, 2011
Octocat-spinner-32 app-nowjs.js made it easier to start using the default app.js by providing a start… April 19, 2011
Octocat-spinner-32 app-socketio.js made it easier to start using the default app.js by providing a start… April 19, 2011
Octocat-spinner-32 app-uniform.js Added code to see application data as an admin April 25, 2011
Octocat-spinner-32 app.js made it easier to start using the default app.js by providing a start… April 19, 2011
Octocat-spinner-32 articleprovider-memory.js removed the src folder, is not required for this type of project April 03, 2011
Octocat-spinner-32 blog.js fixed a few bugs and made the modularization more standard April 17, 2011
Octocat-spinner-32 data.js small thing in the messages obtained for the data view April 25, 2011
Octocat-spinner-32 nowjs.js made the nowjs part also work. still having problems with synchronizi… April 19, 2011
Octocat-spinner-32 package.json for packaging the application April 19, 2011
Octocat-spinner-32 properties.js made the external configuration work April 14, 2011
Octocat-spinner-32 redis.js some improvements to the data side April 25, 2011
Octocat-spinner-32 site.js fixed a few bugs and made the modularization more standard April 17, 2011
Octocat-spinner-32 socketio.js Bug found in hack detection due to a type in names April 25, 2011
README
Welcome to this sample demonstrating some of the options of Node.js

The sample uses expressjs, the layout of the sample is as follows:
- config [contains configuration files that can make the sample environment specific]
- public [contains the files that are exposed using the http server like style sheets and client side javascripts]
- views [contains the views, in my case jade templates and view files]

You can start the application in two modes:
- socketio [is functioning completely and the main focus at the moment]
- nowjs [at the moment not a fully functional sample, will be in the near future]
- app-uniform.js [contains the generic part of the application, this way I do not have to program the same thing for the socket.io and nowjs sample]
- app.js [used to start the sample, the default is socketio, if you provide nowjs as an argument, that technology is used]

Just to be sure, examples for starting the sample:
node app.js
node app.js nowjs

The final remark is about configuring the sample. If you want to make use of the twitter authentication you have to provide the consumer key and secret as well as the server name for the callback. There is a template for the config.json available in the config folder. Copy the file and name it as config.json.
Something went wrong with that request. Please try again.