Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server.js
- =====================================
- var app = express.createServer();
- app.configure(function(){
- app.use(express.methodOverride());
- app.use(express.bodyParser());
- app.set('view engine', 'html');
- app.register('.html', require('jqtpl'));
- });
- app.post('/login', function(req, res, next){
- console.dir(req.body);
- });
- ...
- login.html
- =====================================
- <form action="/login" method="post" accept-charset="utf-8">
- <label for="login">Login</label>
- <input type="text" name="[user]login" id="login" value="" />
- <label for="password">Password</label>
- <input type="password" name="[user]password" id="password" value="" />
- <input type="submit" name="submit" value="Log in">
- </form>
Add Comment
Please, Sign In to add comment