This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Response = require("appjs/lib/router/Response"); | |
var Request = require("appjs/lib/router/Request"); | |
Response.prototype.redirect = function(path){ | |
this.req.url = path; | |
req = new Request({url: path, headers: this.req.headers, method: "get", post: this.req.post, files: this.req.files}); | |
Server.handle.apply(Server, [req, this, this.req.next]); | |
}; | |
// Use this Getter method for including 'session management' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Express = require("express"); // express 2.5.9 | |
var AppJS = require("appjs"); | |
var Utils = require("util"); | |
// Create out Express server application | |
var App = Express.createServer(); | |
// Set our Express server application settings | |
App.use(Express.bodyParser()); | |
App.register("jade", require("jade").express); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Express = require("express") | |
require "./express_namespace" | |
App = Express.createServer() | |
App.get "/start", (req, res, next) -> | |
res.end "this is the start end point without namespace" | |