truedat101 / jumbosocket

A simple little server for creating big ideas with Node.js + Socket.io. Serve static || dynamic + Socket.io apps.
https://github.com/truedat101/jumbosocket
4 stars 1 forks source link

Goal

The goal of Jumbosocket is to provide a boilerplate for quickstart of a node.js + socket.io app. While this is easily possible in a few lines of JS code, it is nice to have a tested set of components to start using. The HTML5 boilerplate is provided, along with CSS stubs, and a few JS scripts for a basic app, plus the needed JS libraries we all depend on for things. With this setup, you should be able to get started coding in about 5 minutes or less. This app doesn't do much, but you can at least prove your socket.io setup is working. A secondary goal is that the code be short enough that you can walk through every line of the code an understand what the server is doing. And in that spirit, it was not an objective that you have to go out and learn a framework to be productive, which can take days, weeks, months, or years.

Design Requirements

Installation

You can simply run 'npm install js.js'

-or-

Grab the source and install the prerequisites:

Usage

This is inteneded to use as a project template or as a module used as a middleware layer for your own projects.

As a template, just copy the source code and start building your project. See Development section below.

As a module, require js.

Configure

To run

node js.js to run a default service (doesn't do much other than play pingpong with socket.io messages and serve some test routes).

and then run with:

node js.js

Also, forever is another way to go when you want to manage this as a service.

A better way: Create an server wrapper to add your own routes and socket.io handler.
cd /examples node examplejs-server.js

Development

If you want to build on top of this, the best thing is to create a server.js file and require('./js.js'); Then you can just define your routes and any utility methods inside of server.js. As I have recommended above, use nodemon or similar to speed up your dev cycles.

Releasing

If you are one the release team (let me know if you want to work on this), and here's the release flow.

Demo Routes

On Port 8000:
    /helloworld - A basic static html page served up by node
    /helloworldly/<some path> - A basic static html page using the route filtering feature of this server.  It will print <some path> to the screen.
    /about - about this demo
    / - A simple socket.io demo showing basic messaging process

Troubleshooting

Suggestions and Questions

Release Notes

v0.1.19

v0.1.18

v0.1.17

v0.1.16

v0.1.15

v0.1.14


v0.1.13


v0.1.12


v0.1.11


v0.1.10


v0.1.9


v0.1.8


v0.1.7


v0.1.6


v0.1.5


v0.1.4

v0.1.3

v0.1.2

v0.1.1

v0.1.0

v0.0.35

v0.0.1

Attributions

TODO: Add links