Guest User

Untitled

a guest
Jul 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. var connect = require('connect');
  2. var server = connect.createServer();
  3. server.use(connect.router(function (app) {
  4. app.get('/login.html', function (req, res) {
  5. res.writeHead(200);
  6. res.end('login');
  7. })
  8. app.get('/logout.html', function (req, res) {
  9. res.writeHead(200);
  10. res.end('logout');
  11. })
  12. app.get(/./, function (req, res) {
  13. res.writeHead(200);
  14. res.end('default route');
  15. })
  16. }));
  17. server.listen(8080);
Add Comment
Please, Sign In to add comment