Reputation: 904
I am using loopback and building a login page. The client side files have the login page $(document).ready(function(){
$('#login').click(function(){
var username = $('#usr').val();
var password = $('#pwd').val();
$.get("http://server,{
user_type:1,
username:username,
password:password
},function(data,status,xhr){
console.log("Request was "+status);
console.log("Result : "+data.login_type);
console.log("UserId : "+data.user_id);
if(dat.login_type == 'success'){
// Redirect to other server
}
});
});
})
this is hosted on localhost:3000, when a http request is made to this server , how can i get the incoming request object?
Upvotes: 0
Views: 630
Reputation: 1648
Here you have description how to add a static web page and here how add a simple Express routing
Upvotes: 2