Skip to content

Instantly share code, notes, and snippets.

View Proful's full-sized avatar

Proful Sadangi Proful

View GitHub Profile
@Proful
Proful / corejs-example.js
Created January 13, 2012 17:57
Sample CoreJS App
function MainController() {
var util = require('util');
this.authRequired = true;
public_get('/login', function(req, res) {
res.rawHttpMessage("Please " + "Authenticate →".link('/auth'));
});
var Express = require('express')
, express = Express.createServer()
express.listen()
var session = require('connect-redis')(Express)
, dnode = require('dnode')()
, dnodeSession = require('dnode-session')
, dnodeAuth = require('./lib/rpc.auth')