couple

0.1.1 • Public • Published

Couple

Couple is an event based collaboration of NodeJS, Express, Socket.IO, Jade and Stylus

Installing:

npm install couple

Usage:

var couple = require('couple');

var app = new couple({
    port: 8080
});

app.start();

Options:

port: Number //change the listen to port, Default: 80
sid: String //the key to use for express session store, Default: couple.sid
secret: String //the secret to use for express session store, Default: secret
view: String //the directory where the views are, Default: ''
viewCahce: Boolean //whether or not to enable view caching, Default: false
viewLayout: Boolean //whether or not to enable global layout, Default: false
static: String //the directory where to serve static files from, Default: 'public'
routes: Function(express) //function to call to establish any special routes, Default: function(express){}
ioLog: Boolean //whether or not to enable socket.io logging, Default: false

Events:

express::init: Function(express) //event after express has been setup
express::start: null //event after express has been started
express::stop: null //event after express has been stopped
express::request: Function(req,res) //event after the catchall route is called

io::init: Function(io) //event after socket.io has been setup
io::start: null //event after express has been started
io::stop: null //event after express has been started
io::connect: Function(socket) //event after a new client has conencted

Functions:

Constructor( options ) //called on initialization options is an array of settings
start() //call to start the server
stop() //call to stop the server

Readme

Keywords

none

Package Sidebar

Install

npm i couple

Weekly Downloads

1

Version

0.1.1

License

none

Last publish

Collaborators

  • brett_langdon