Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Correctly Version
- //Import the necessary libraries/declare the necessary objects
- var express = require("express");
- var myParser = require("body-parser");
- var app = express();
- //Login
- app.use(myParser.urlencoded({extended : true}));
- app.post("/login", function(request, response) {
- var data = JSON.parse(Object.keys(request.body)[0]);
- var username = data.Username;
- var password = data.Password;
- console.log(username);
- console.log(password);
- });
- //Application Listen on Port
- app.listen(3000,function(){
- console.log("Application Server Start on Port: 3000");
- })
Add Comment
Please, Sign In to add comment