Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var connect = require('connect');
- var server = connect.createServer();
- server.use(connect.router(function (app) {
- app.get('/login.html', function (req, res) {
- res.writeHead(200);
- res.end('login');
- })
- app.get('/logout.html', function (req, res) {
- res.writeHead(200);
- res.end('logout');
- })
- app.get(/./, function (req, res) {
- res.writeHead(200);
- res.end('default route');
- })
- }));
- server.listen(8080);
Add Comment
Please, Sign In to add comment