fixed routing
This commit is contained in:
parent
2723da0d6a
commit
06e6780cd1
|
@ -47,7 +47,7 @@ var config_nev = function () {
|
|||
} else {
|
||||
console.log(info);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
});
|
||||
nev.generateTempUserModel(User);
|
||||
|
@ -89,58 +89,64 @@ exports.resendVerificationEmail = function(req, res, next){
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Signup
|
||||
*/
|
||||
exports.signup = function(req, res) {
|
||||
// For security measurement we remove the roles from the req.body object
|
||||
delete req.body.roles;
|
||||
console.log(req.body);
|
||||
// For security measures we remove the roles from the req.body object
|
||||
if (req.body) {
|
||||
delete req.body.roles;
|
||||
console.log(req.body);
|
||||
|
||||
// Init Variables
|
||||
var user = new User(req.body);
|
||||
// Init Variables
|
||||
var user = new User(req.body);
|
||||
|
||||
// Add missing user fields
|
||||
user.provider = 'local';
|
||||
user.username = user.email;
|
||||
// Add missing user fields
|
||||
user.provider = 'local';
|
||||
user.username = user.email;
|
||||
|
||||
// Then save the temporary user
|
||||
nev.createTempUser(user, function(err, newTempUser) {
|
||||
// Then save the temporary user
|
||||
nev.createTempUser(user, function (err, newTempUser) {
|
||||
|
||||
if (err) {
|
||||
console.log('Error: ');
|
||||
console.log(err);
|
||||
return res.status(400).send({
|
||||
message: errorHandler.getErrorMessage(err)
|
||||
});
|
||||
}else {
|
||||
if (err) {
|
||||
console.log('Error: ');
|
||||
console.log(err);
|
||||
return res.status(400).send({
|
||||
message: errorHandler.getErrorMessage(err)
|
||||
});
|
||||
} else {
|
||||
|
||||
// new user created
|
||||
if (newTempUser) {
|
||||
nev.registerTempUser(newTempUser, function (err) {
|
||||
if (err) {
|
||||
console.log('Error: ');
|
||||
console.log(err);
|
||||
return res.status(400).send({
|
||||
message: errorHandler.getErrorMessage(err)
|
||||
});
|
||||
}else {
|
||||
console.log('new tmpuser registered');
|
||||
return res.status(200).send('An email has been sent to you. Please check it to verify your account.');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log('Error: User already exists!');
|
||||
return res.status(400).send({ message: 'Error: User already exists!' });
|
||||
}
|
||||
}
|
||||
});
|
||||
// new user created
|
||||
if (newTempUser) {
|
||||
nev.registerTempUser(newTempUser, function (err) {
|
||||
if (err) {
|
||||
console.log('Error: ');
|
||||
console.log(err);
|
||||
return res.status(400).send({
|
||||
message: errorHandler.getErrorMessage(err)
|
||||
});
|
||||
} else {
|
||||
console.log('new tmpuser registered');
|
||||
return res.status(200).send('An email has been sent to you. Please check it to verify your account.');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log('Error: User already exists!');
|
||||
return res.status(400).send({message: 'Error: User already exists!'});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
res.status(500).send('Incomplete Data');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Signin after passport authentication
|
||||
*/
|
||||
exports.signin = function(req, res, next) {
|
||||
console.log(req);
|
||||
passport.authenticate('local', function(err, user, info) {
|
||||
if (err || !user) {
|
||||
res.status(400).send(info);
|
||||
|
|
|
@ -33,20 +33,43 @@ var UserSchema = new Schema({
|
|||
type: String,
|
||||
trim: true,
|
||||
default: '',
|
||||
validate: [validateLocalStrategyProperty, 'Please fill in your first name']
|
||||
validate: {
|
||||
validator: function(property) {
|
||||
return ((this.provider !== 'local' && !this.updated) || property.length);
|
||||
},
|
||||
message: 'Please fill in your first name'
|
||||
}
|
||||
},
|
||||
lastName: {
|
||||
type: String,
|
||||
trim: true,
|
||||
default: '',
|
||||
validate: [validateLocalStrategyProperty, 'Please fill in your last name']
|
||||
validate: {
|
||||
validator: function(property) {
|
||||
console.log(property);
|
||||
return ((this.provider !== 'local' && !this.updated) || property.length);
|
||||
},
|
||||
message: 'Please fill in your last name'
|
||||
}
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
trim: true,
|
||||
unique: 'Account already exists with this email',
|
||||
required: 'Please enter your email',
|
||||
validate: [validateLocalStrategyProperty, 'Please fill in your email'],
|
||||
validate: {
|
||||
validator: function(property) {
|
||||
var propHasLength;
|
||||
if (property) {
|
||||
propHasLength = !!property.length;
|
||||
} else {
|
||||
propHasLength = false;
|
||||
}
|
||||
|
||||
return ((this.provider !== 'local' && !this.updated) || propHasLength);
|
||||
},
|
||||
message: 'Please fill in your email'
|
||||
},
|
||||
match: [/.+\@.+\..+/, 'Please fill a valid email address']
|
||||
},
|
||||
username: {
|
||||
|
@ -57,7 +80,7 @@ var UserSchema = new Schema({
|
|||
},
|
||||
passwordHash: {
|
||||
type: String,
|
||||
default: '',
|
||||
default: ''
|
||||
},
|
||||
salt: {
|
||||
type: String
|
||||
|
|
|
@ -32,16 +32,6 @@ module.exports = function(db) {
|
|||
// Initialize express app
|
||||
var app = express();
|
||||
|
||||
// Globbing model files
|
||||
config.getGlobbedFiles('./app/models/**/*.js').forEach(function(modelPath) {
|
||||
require(path.resolve(modelPath));
|
||||
});
|
||||
|
||||
// Globbing routing files
|
||||
config.getGlobbedFiles('./app/routes/**/*.js').forEach(function(routePath) {
|
||||
require(path.resolve(routePath))(app);
|
||||
});
|
||||
|
||||
// Setting application local variables
|
||||
app.locals.title = config.app.title;
|
||||
app.locals.description = config.app.description;
|
||||
|
@ -77,7 +67,6 @@ module.exports = function(db) {
|
|||
// Showing stack errors
|
||||
app.set('showStackError', true);
|
||||
|
||||
|
||||
// Set swig as the template engine
|
||||
app.engine('server.view.html', consolidate[config.templateEngine]);
|
||||
|
||||
|
@ -103,6 +92,16 @@ module.exports = function(db) {
|
|||
app.use(bodyParser.json());
|
||||
app.use(methodOverride());
|
||||
|
||||
// Globbing model files
|
||||
config.getGlobbedFiles('./app/models/**/*.js').forEach(function(modelPath) {
|
||||
require(path.resolve(modelPath));
|
||||
});
|
||||
|
||||
// Globbing routing files
|
||||
config.getGlobbedFiles('./app/routes/**/*.js').forEach(function(routePath) {
|
||||
require(path.resolve(routePath))(app);
|
||||
});
|
||||
|
||||
// Use helmet to secure Express headers
|
||||
app.use(helmet.xframe());
|
||||
app.use(helmet.xssFilter());
|
||||
|
@ -141,6 +140,7 @@ module.exports = function(db) {
|
|||
app.use(flash());
|
||||
|
||||
// Add headers for Sentry
|
||||
/*
|
||||
app.use(function (req, res, next) {
|
||||
|
||||
// Website you wish to allow to connect
|
||||
|
@ -159,12 +159,12 @@ module.exports = function(db) {
|
|||
// Pass to next layer of middleware
|
||||
next();
|
||||
});
|
||||
|
||||
*/
|
||||
// Sentry (Raven) middleware
|
||||
app.use(raven.middleware.express.requestHandler(config.DSN));
|
||||
// app.use(raven.middleware.express.requestHandler(config.DSN));
|
||||
|
||||
// Should come before any other error middleware
|
||||
app.use(raven.middleware.express.errorHandler(config.DSN));
|
||||
// app.use(raven.middleware.express.errorHandler(config.DSN));
|
||||
|
||||
// Assume 'not found' in the error msgs is a 404. this is somewhat silly, but valid, you can do whatever you like, set properties, use instanceof etc.
|
||||
app.use(function(err, req, res, next) {
|
||||
|
|
549
public/dist/application.js
vendored
549
public/dist/application.js
vendored
File diff suppressed because one or more lines are too long
4
public/dist/application.min.css
vendored
4
public/dist/application.min.css
vendored
File diff suppressed because one or more lines are too long
6
public/dist/application.min.js
vendored
6
public/dist/application.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -8,6 +8,7 @@ angular.module('users').controller('AuthenticationController', ['$scope', '$loca
|
|||
$scope.error = '';
|
||||
|
||||
$scope.signin = function() {
|
||||
$scope.credentials.email = $scope.credentials.username;
|
||||
User.login($scope.credentials).then(
|
||||
function(response) {
|
||||
Auth.login(response);
|
||||
|
@ -30,6 +31,7 @@ angular.module('users').controller('AuthenticationController', ['$scope', '$loca
|
|||
};
|
||||
|
||||
$scope.signup = function() {
|
||||
console.log($scope.credentials);
|
||||
User.signup($scope.credentials).then(
|
||||
function(response) {
|
||||
console.log('signup-success');
|
||||
|
|
|
@ -27,20 +27,20 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label for="firstName">First Name</label>
|
||||
<input type="text" ng-pattern="/^[a-zA-Z0-9 \-.]*$/" required id="firstName" name="firstName" class="form-control" data-ng-model="credentials.firstName" placeholder="First Name">
|
||||
<input type="text" ng-pattern="/^[a-zA-Z0-9 \-.]*$/" required id="firstName" name="firstName" class="form-control" ng-model="credentials.firstName" placeholder="First Name">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lastName">Last Name</label>
|
||||
<input type="text" ng-pattern="/^[a-zA-Z0-9 \-.]*$/" required id="lastName" name="lastName" class="form-control" data-ng-model="credentials.lastName" placeholder="Last Name">
|
||||
<input type="text" ng-pattern="/^[a-zA-Z0-9 \-.]*$/" required id="lastName" name="lastName" class="form-control" ng-model="credentials.lastName" placeholder="Last Name">
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" id="email" name="email" class="form-control" data-ng-model="credentials.email" placeholder="Email">
|
||||
<input type="email" id="email" name="email" class="form-control" ng-model="credentials.email" placeholder="Email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" class="form-control" data-ng-model="credentials.password" placeholder="Password">
|
||||
<input type="password" id="password" name="password" class="form-control" ng-model="credentials.password" placeholder="Password">
|
||||
</div>
|
||||
<div class="text-center form-group">
|
||||
<button type="submit" class="btn btn-large btn-primary">Sign up</button>
|
||||
|
|
|
@ -302,7 +302,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
|
|||
$templateCache.put("../public/modules/users/views/authentication/signup-success.client.view.html",
|
||||
"<section class=\"row auth signup-view success\" data-ng-controller=AuthenticationController><h3 class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6 text-center\">Signup Successful</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><h2>You've successfully registered an account at TellForm.<br><br>But your account is <b>not activated yet</b></h2><br><br><p>Before you continue, make sure to check your email for our verification. If you don't receive it within 24h drop us a line at <a href=mail:hi@tellform.com>hi@TellForm.com</a></p><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\"><a href=\"/#!/\" style=\"color: white; text-decoration: none\">Continue</a></button></div></div></section>");
|
||||
$templateCache.put("../public/modules/users/views/authentication/signup.client.view.html",
|
||||
"<section class=\"row auth signup-view\" data-ng-controller=AuthenticationController><h3 class=\"col-md-12 text-center\">Signup with your email</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form name=userForm data-ng-submit=signup() class=\"signin form-horizontal\" novalidate autocomplete=off><fieldset><div data-ng-show=error id=signup_errors class=\"text-center text-danger\">Couldn't submit form due to errors:<br><strong data-ng-bind=error></strong></div><div class=form-group><label for=firstName>First Name</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=firstName name=firstName class=form-control data-ng-model=credentials.firstName placeholder=\"First Name\"></div><div class=form-group><label for=lastName>Last Name</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=lastName name=lastName class=form-control data-ng-model=credentials.lastName placeholder=\"Last Name\"></div><hr><div class=form-group><label for=email>Email</label><input type=email id=email name=email class=form-control data-ng-model=credentials.email placeholder=Email></div><div class=form-group><label for=password>Password</label><input type=password id=password name=password class=form-control data-ng-model=credentials.password placeholder=Password></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\">Sign up</button></div></fieldset></form></div></section>");
|
||||
"<section class=\"row auth signup-view\" data-ng-controller=AuthenticationController><h3 class=\"col-md-12 text-center\">Signup with your email</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form name=userForm data-ng-submit=signup() class=\"signin form-horizontal\" novalidate autocomplete=off><fieldset><div data-ng-show=error id=signup_errors class=\"text-center text-danger\">Couldn't submit form due to errors:<br><strong data-ng-bind=error></strong></div><div class=form-group><label for=firstName>First Name</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=firstName name=firstName class=form-control ng-model=credentials.firstName placeholder=\"First Name\"></div><div class=form-group><label for=lastName>Last Name</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=lastName name=lastName class=form-control ng-model=credentials.lastName placeholder=\"Last Name\"></div><hr><div class=form-group><label for=email>Email</label><input type=email id=email name=email class=form-control ng-model=credentials.email placeholder=Email></div><div class=form-group><label for=password>Password</label><input type=password id=password name=password class=form-control ng-model=credentials.password placeholder=Password></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\">Sign up</button></div></fieldset></form></div></section>");
|
||||
$templateCache.put("../public/modules/users/views/password/forgot-password.client.view.html",
|
||||
"<section class=\"auth row\" data-ng-controller=PasswordController><h3 class=\"col-md-12 text-center\">Restore your password</h3><p class=\"small text-center\">Enter your account email.</p><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form data-ng-submit=askForPasswordReset() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><input id=username name=username class=form-control data-ng-model=credentials.username placeholder=Username></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-primary\">Submit</button></div><div data-ng-show=error class=\"text-center text-danger\"><strong>{{error}}</strong></div><div data-ng-show=success class=\"text-center text-success\"><strong>{{success}}</strong></div></fieldset></form></div></section>");
|
||||
$templateCache.put("../public/modules/users/views/password/reset-password-invalid.client.view.html",
|
||||
|
|
842
request
Normal file
842
request
Normal file
|
@ -0,0 +1,842 @@
|
|||
IncomingMessage {
|
||||
_readableState:
|
||||
ReadableState {
|
||||
objectMode: false,
|
||||
highWaterMark: 16384,
|
||||
buffer: [],
|
||||
length: 0,
|
||||
pipes: null,
|
||||
pipesCount: 0,
|
||||
flowing: null,
|
||||
ended: false,
|
||||
endEmitted: false,
|
||||
reading: false,
|
||||
sync: true,
|
||||
needReadable: false,
|
||||
emittedReadable: false,
|
||||
readableListening: false,
|
||||
resumeScheduled: false,
|
||||
defaultEncoding: 'utf8',
|
||||
ranOut: false,
|
||||
awaitDrain: 0,
|
||||
readingMore: false,
|
||||
decoder: null,
|
||||
encoding: null },
|
||||
readable: true,
|
||||
domain: null,
|
||||
_events: {},
|
||||
_eventsCount: 0,
|
||||
_maxListeners: undefined,
|
||||
socket:
|
||||
Socket {
|
||||
_connecting: false,
|
||||
_hadError: false,
|
||||
_handle:
|
||||
TCP {
|
||||
_externalStream: {},
|
||||
fd: 31,
|
||||
reading: true,
|
||||
owner: [Circular],
|
||||
onread: [Function: onread],
|
||||
onconnection: null,
|
||||
writeQueueSize: 0 },
|
||||
_parent: null,
|
||||
_host: null,
|
||||
_readableState:
|
||||
ReadableState {
|
||||
objectMode: false,
|
||||
highWaterMark: 16384,
|
||||
buffer: [],
|
||||
length: 0,
|
||||
pipes: null,
|
||||
pipesCount: 0,
|
||||
flowing: true,
|
||||
ended: false,
|
||||
endEmitted: false,
|
||||
reading: true,
|
||||
sync: false,
|
||||
needReadable: true,
|
||||
emittedReadable: false,
|
||||
readableListening: false,
|
||||
resumeScheduled: false,
|
||||
defaultEncoding: 'utf8',
|
||||
ranOut: false,
|
||||
awaitDrain: 0,
|
||||
readingMore: false,
|
||||
decoder: null,
|
||||
encoding: null },
|
||||
readable: true,
|
||||
domain: null,
|
||||
_events:
|
||||
{ end: [Object],
|
||||
finish: [Function: onSocketFinish],
|
||||
_socketEnd: [Function: onSocketEnd],
|
||||
drain: [Object],
|
||||
timeout: [Function],
|
||||
error: [Object],
|
||||
close: [Object],
|
||||
data: [Function: socketOnData],
|
||||
resume: [Function: onSocketResume],
|
||||
pause: [Function: onSocketPause] },
|
||||
_eventsCount: 10,
|
||||
_maxListeners: undefined,
|
||||
_writableState:
|
||||
WritableState {
|
||||
objectMode: false,
|
||||
highWaterMark: 16384,
|
||||
needDrain: false,
|
||||
ending: false,
|
||||
ended: false,
|
||||
finished: false,
|
||||
decodeStrings: false,
|
||||
defaultEncoding: 'utf8',
|
||||
length: 0,
|
||||
writing: false,
|
||||
corked: 0,
|
||||
sync: false,
|
||||
bufferProcessing: false,
|
||||
onwrite: [Function],
|
||||
writecb: null,
|
||||
writelen: 0,
|
||||
bufferedRequest: null,
|
||||
lastBufferedRequest: null,
|
||||
pendingcb: 0,
|
||||
prefinished: false,
|
||||
errorEmitted: false,
|
||||
bufferedRequestCount: 0,
|
||||
corkedRequestsFree: [Object] },
|
||||
writable: true,
|
||||
allowHalfOpen: true,
|
||||
destroyed: false,
|
||||
bytesRead: 0,
|
||||
_bytesDispatched: 6281,
|
||||
_sockname: null,
|
||||
_pendingData: null,
|
||||
_pendingEncoding: '',
|
||||
server:
|
||||
Server {
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 3,
|
||||
_maxListeners: undefined,
|
||||
_connections: 6,
|
||||
_handle: [Object],
|
||||
_usingSlaves: false,
|
||||
_slaves: [],
|
||||
_unref: false,
|
||||
allowHalfOpen: true,
|
||||
pauseOnConnect: false,
|
||||
httpAllowHalfOpen: false,
|
||||
timeout: 120000,
|
||||
_pendingResponseData: 0,
|
||||
_connectionKey: '6::::3000' },
|
||||
_server:
|
||||
Server {
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 3,
|
||||
_maxListeners: undefined,
|
||||
_connections: 6,
|
||||
_handle: [Object],
|
||||
_usingSlaves: false,
|
||||
_slaves: [],
|
||||
_unref: false,
|
||||
allowHalfOpen: true,
|
||||
pauseOnConnect: false,
|
||||
httpAllowHalfOpen: false,
|
||||
timeout: 120000,
|
||||
_pendingResponseData: 0,
|
||||
_connectionKey: '6::::3000' },
|
||||
_idleTimeout: 120000,
|
||||
_idleNext:
|
||||
Socket {
|
||||
_connecting: false,
|
||||
_hadError: false,
|
||||
_handle: [Object],
|
||||
_parent: null,
|
||||
_host: null,
|
||||
_readableState: [Object],
|
||||
readable: true,
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 10,
|
||||
_maxListeners: undefined,
|
||||
_writableState: [Object],
|
||||
writable: true,
|
||||
allowHalfOpen: true,
|
||||
destroyed: false,
|
||||
bytesRead: 0,
|
||||
_bytesDispatched: 4792,
|
||||
_sockname: null,
|
||||
_pendingData: null,
|
||||
_pendingEncoding: '',
|
||||
server: [Object],
|
||||
_server: [Object],
|
||||
_idleTimeout: 120000,
|
||||
_idleNext: [Object],
|
||||
_idlePrev: [Circular],
|
||||
_idleStart: 5391,
|
||||
parser: [Object],
|
||||
on: [Function: socketOnWrap],
|
||||
_paused: false,
|
||||
read: [Function],
|
||||
_consuming: true,
|
||||
_httpMessage: null,
|
||||
_peername: [Object] },
|
||||
_idlePrev:
|
||||
TimersList {
|
||||
_idleNext: [Circular],
|
||||
_idlePrev: [Object],
|
||||
_timer: [Object],
|
||||
_unrefed: true,
|
||||
msecs: 120000 },
|
||||
_idleStart: 6269,
|
||||
parser:
|
||||
HTTPParser {
|
||||
'0': [Function: parserOnHeaders],
|
||||
'1': [Function: parserOnHeadersComplete],
|
||||
'2': [Function: parserOnBody],
|
||||
'3': [Function: parserOnMessageComplete],
|
||||
'4': [Function: onParserExecute],
|
||||
_headers: [],
|
||||
_url: '',
|
||||
_consumed: true,
|
||||
socket: [Circular],
|
||||
incoming: [Circular],
|
||||
outgoing: null,
|
||||
maxHeaderPairs: 2000,
|
||||
onIncoming: [Function: parserOnIncoming] },
|
||||
on: [Function: socketOnWrap],
|
||||
_paused: false,
|
||||
read: [Function],
|
||||
_consuming: true,
|
||||
_httpMessage:
|
||||
ServerResponse {
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 1,
|
||||
_maxListeners: undefined,
|
||||
output: [],
|
||||
outputEncodings: [],
|
||||
outputCallbacks: [],
|
||||
outputSize: 0,
|
||||
writable: true,
|
||||
_last: false,
|
||||
chunkedEncoding: false,
|
||||
shouldKeepAlive: true,
|
||||
useChunkedEncodingByDefault: true,
|
||||
sendDate: true,
|
||||
_removedHeader: {},
|
||||
_contentLength: null,
|
||||
_hasBody: true,
|
||||
_trailer: '',
|
||||
finished: false,
|
||||
_headerSent: false,
|
||||
socket: [Circular],
|
||||
connection: [Circular],
|
||||
_header: null,
|
||||
_headers: null,
|
||||
_headerNames: {},
|
||||
_onPendingData: [Function: updateOutgoingData],
|
||||
req: [Circular],
|
||||
locals: {} },
|
||||
_peername: { address: '::1', family: 'IPv6', port: 50247 } },
|
||||
connection:
|
||||
Socket {
|
||||
_connecting: false,
|
||||
_hadError: false,
|
||||
_handle:
|
||||
TCP {
|
||||
_externalStream: {},
|
||||
fd: 31,
|
||||
reading: true,
|
||||
owner: [Circular],
|
||||
onread: [Function: onread],
|
||||
onconnection: null,
|
||||
writeQueueSize: 0 },
|
||||
_parent: null,
|
||||
_host: null,
|
||||
_readableState:
|
||||
ReadableState {
|
||||
objectMode: false,
|
||||
highWaterMark: 16384,
|
||||
buffer: [],
|
||||
length: 0,
|
||||
pipes: null,
|
||||
pipesCount: 0,
|
||||
flowing: true,
|
||||
ended: false,
|
||||
endEmitted: false,
|
||||
reading: true,
|
||||
sync: false,
|
||||
needReadable: true,
|
||||
emittedReadable: false,
|
||||
readableListening: false,
|
||||
resumeScheduled: false,
|
||||
defaultEncoding: 'utf8',
|
||||
ranOut: false,
|
||||
awaitDrain: 0,
|
||||
readingMore: false,
|
||||
decoder: null,
|
||||
encoding: null },
|
||||
readable: true,
|
||||
domain: null,
|
||||
_events:
|
||||
{ end: [Object],
|
||||
finish: [Function: onSocketFinish],
|
||||
_socketEnd: [Function: onSocketEnd],
|
||||
drain: [Object],
|
||||
timeout: [Function],
|
||||
error: [Object],
|
||||
close: [Object],
|
||||
data: [Function: socketOnData],
|
||||
resume: [Function: onSocketResume],
|
||||
pause: [Function: onSocketPause] },
|
||||
_eventsCount: 10,
|
||||
_maxListeners: undefined,
|
||||
_writableState:
|
||||
WritableState {
|
||||
objectMode: false,
|
||||
highWaterMark: 16384,
|
||||
needDrain: false,
|
||||
ending: false,
|
||||
ended: false,
|
||||
finished: false,
|
||||
decodeStrings: false,
|
||||
defaultEncoding: 'utf8',
|
||||
length: 0,
|
||||
writing: false,
|
||||
corked: 0,
|
||||
sync: false,
|
||||
bufferProcessing: false,
|
||||
onwrite: [Function],
|
||||
writecb: null,
|
||||
writelen: 0,
|
||||
bufferedRequest: null,
|
||||
lastBufferedRequest: null,
|
||||
pendingcb: 0,
|
||||
prefinished: false,
|
||||
errorEmitted: false,
|
||||
bufferedRequestCount: 0,
|
||||
corkedRequestsFree: [Object] },
|
||||
writable: true,
|
||||
allowHalfOpen: true,
|
||||
destroyed: false,
|
||||
bytesRead: 0,
|
||||
_bytesDispatched: 6281,
|
||||
_sockname: null,
|
||||
_pendingData: null,
|
||||
_pendingEncoding: '',
|
||||
server:
|
||||
Server {
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 3,
|
||||
_maxListeners: undefined,
|
||||
_connections: 6,
|
||||
_handle: [Object],
|
||||
_usingSlaves: false,
|
||||
_slaves: [],
|
||||
_unref: false,
|
||||
allowHalfOpen: true,
|
||||
pauseOnConnect: false,
|
||||
httpAllowHalfOpen: false,
|
||||
timeout: 120000,
|
||||
_pendingResponseData: 0,
|
||||
_connectionKey: '6::::3000' },
|
||||
_server:
|
||||
Server {
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 3,
|
||||
_maxListeners: undefined,
|
||||
_connections: 6,
|
||||
_handle: [Object],
|
||||
_usingSlaves: false,
|
||||
_slaves: [],
|
||||
_unref: false,
|
||||
allowHalfOpen: true,
|
||||
pauseOnConnect: false,
|
||||
httpAllowHalfOpen: false,
|
||||
timeout: 120000,
|
||||
_pendingResponseData: 0,
|
||||
_connectionKey: '6::::3000' },
|
||||
_idleTimeout: 120000,
|
||||
_idleNext:
|
||||
Socket {
|
||||
_connecting: false,
|
||||
_hadError: false,
|
||||
_handle: [Object],
|
||||
_parent: null,
|
||||
_host: null,
|
||||
_readableState: [Object],
|
||||
readable: true,
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 10,
|
||||
_maxListeners: undefined,
|
||||
_writableState: [Object],
|
||||
writable: true,
|
||||
allowHalfOpen: true,
|
||||
destroyed: false,
|
||||
bytesRead: 0,
|
||||
_bytesDispatched: 4792,
|
||||
_sockname: null,
|
||||
_pendingData: null,
|
||||
_pendingEncoding: '',
|
||||
server: [Object],
|
||||
_server: [Object],
|
||||
_idleTimeout: 120000,
|
||||
_idleNext: [Object],
|
||||
_idlePrev: [Circular],
|
||||
_idleStart: 5391,
|
||||
parser: [Object],
|
||||
on: [Function: socketOnWrap],
|
||||
_paused: false,
|
||||
read: [Function],
|
||||
_consuming: true,
|
||||
_httpMessage: null,
|
||||
_peername: [Object] },
|
||||
_idlePrev:
|
||||
TimersList {
|
||||
_idleNext: [Circular],
|
||||
_idlePrev: [Object],
|
||||
_timer: [Object],
|
||||
_unrefed: true,
|
||||
msecs: 120000 },
|
||||
_idleStart: 6269,
|
||||
parser:
|
||||
HTTPParser {
|
||||
'0': [Function: parserOnHeaders],
|
||||
'1': [Function: parserOnHeadersComplete],
|
||||
'2': [Function: parserOnBody],
|
||||
'3': [Function: parserOnMessageComplete],
|
||||
'4': [Function: onParserExecute],
|
||||
_headers: [],
|
||||
_url: '',
|
||||
_consumed: true,
|
||||
socket: [Circular],
|
||||
incoming: [Circular],
|
||||
outgoing: null,
|
||||
maxHeaderPairs: 2000,
|
||||
onIncoming: [Function: parserOnIncoming] },
|
||||
on: [Function: socketOnWrap],
|
||||
_paused: false,
|
||||
read: [Function],
|
||||
_consuming: true,
|
||||
_httpMessage:
|
||||
ServerResponse {
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 1,
|
||||
_maxListeners: undefined,
|
||||
output: [],
|
||||
outputEncodings: [],
|
||||
outputCallbacks: [],
|
||||
outputSize: 0,
|
||||
writable: true,
|
||||
_last: false,
|
||||
chunkedEncoding: false,
|
||||
shouldKeepAlive: true,
|
||||
useChunkedEncodingByDefault: true,
|
||||
sendDate: true,
|
||||
_removedHeader: {},
|
||||
_contentLength: null,
|
||||
_hasBody: true,
|
||||
_trailer: '',
|
||||
finished: false,
|
||||
_headerSent: false,
|
||||
socket: [Circular],
|
||||
connection: [Circular],
|
||||
_header: null,
|
||||
_headers: null,
|
||||
_headerNames: {},
|
||||
_onPendingData: [Function: updateOutgoingData],
|
||||
req: [Circular],
|
||||
locals: {} },
|
||||
_peername: { address: '::1', family: 'IPv6', port: 50247 } },
|
||||
httpVersionMajor: 1,
|
||||
httpVersionMinor: 1,
|
||||
httpVersion: '1.1',
|
||||
complete: false,
|
||||
headers:
|
||||
{ host: 'localhost:3000',
|
||||
connection: 'keep-alive',
|
||||
'content-length': '92',
|
||||
accept: 'application/json, text/plain, */*',
|
||||
origin: 'http://localhost:3000',
|
||||
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36',
|
||||
'content-type': 'application/json;charset=UTF-8',
|
||||
dnt: '1',
|
||||
referer: 'http://localhost:3000/',
|
||||
'accept-encoding': 'gzip, deflate',
|
||||
'accept-language': 'en-US,en;q=0.8,fr;q=0.6,it;q=0.4' },
|
||||
rawHeaders:
|
||||
[ 'Host',
|
||||
'localhost:3000',
|
||||
'Connection',
|
||||
'keep-alive',
|
||||
'Content-Length',
|
||||
'92',
|
||||
'Accept',
|
||||
'application/json, text/plain, */*',
|
||||
'Origin',
|
||||
'http://localhost:3000',
|
||||
'User-Agent',
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36',
|
||||
'Content-Type',
|
||||
'application/json;charset=UTF-8',
|
||||
'DNT',
|
||||
'1',
|
||||
'Referer',
|
||||
'http://localhost:3000/',
|
||||
'Accept-Encoding',
|
||||
'gzip, deflate',
|
||||
'Accept-Language',
|
||||
'en-US,en;q=0.8,fr;q=0.6,it;q=0.4' ],
|
||||
trailers: {},
|
||||
rawTrailers: [],
|
||||
upgrade: false,
|
||||
url: '/auth/signin',
|
||||
method: 'POST',
|
||||
statusCode: null,
|
||||
statusMessage: null,
|
||||
client:
|
||||
Socket {
|
||||
_connecting: false,
|
||||
_hadError: false,
|
||||
_handle:
|
||||
TCP {
|
||||
_externalStream: {},
|
||||
fd: 31,
|
||||
reading: true,
|
||||
owner: [Circular],
|
||||
onread: [Function: onread],
|
||||
onconnection: null,
|
||||
writeQueueSize: 0 },
|
||||
_parent: null,
|
||||
_host: null,
|
||||
_readableState:
|
||||
ReadableState {
|
||||
objectMode: false,
|
||||
highWaterMark: 16384,
|
||||
buffer: [],
|
||||
length: 0,
|
||||
pipes: null,
|
||||
pipesCount: 0,
|
||||
flowing: true,
|
||||
ended: false,
|
||||
endEmitted: false,
|
||||
reading: true,
|
||||
sync: false,
|
||||
needReadable: true,
|
||||
emittedReadable: false,
|
||||
readableListening: false,
|
||||
resumeScheduled: false,
|
||||
defaultEncoding: 'utf8',
|
||||
ranOut: false,
|
||||
awaitDrain: 0,
|
||||
readingMore: false,
|
||||
decoder: null,
|
||||
encoding: null },
|
||||
readable: true,
|
||||
domain: null,
|
||||
_events:
|
||||
{ end: [Object],
|
||||
finish: [Function: onSocketFinish],
|
||||
_socketEnd: [Function: onSocketEnd],
|
||||
drain: [Object],
|
||||
timeout: [Function],
|
||||
error: [Object],
|
||||
close: [Object],
|
||||
data: [Function: socketOnData],
|
||||
resume: [Function: onSocketResume],
|
||||
pause: [Function: onSocketPause] },
|
||||
_eventsCount: 10,
|
||||
_maxListeners: undefined,
|
||||
_writableState:
|
||||
WritableState {
|
||||
objectMode: false,
|
||||
highWaterMark: 16384,
|
||||
needDrain: false,
|
||||
ending: false,
|
||||
ended: false,
|
||||
finished: false,
|
||||
decodeStrings: false,
|
||||
defaultEncoding: 'utf8',
|
||||
length: 0,
|
||||
writing: false,
|
||||
corked: 0,
|
||||
sync: false,
|
||||
bufferProcessing: false,
|
||||
onwrite: [Function],
|
||||
writecb: null,
|
||||
writelen: 0,
|
||||
bufferedRequest: null,
|
||||
lastBufferedRequest: null,
|
||||
pendingcb: 0,
|
||||
prefinished: false,
|
||||
errorEmitted: false,
|
||||
bufferedRequestCount: 0,
|
||||
corkedRequestsFree: [Object] },
|
||||
writable: true,
|
||||
allowHalfOpen: true,
|
||||
destroyed: false,
|
||||
bytesRead: 0,
|
||||
_bytesDispatched: 6281,
|
||||
_sockname: null,
|
||||
_pendingData: null,
|
||||
_pendingEncoding: '',
|
||||
server:
|
||||
Server {
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 3,
|
||||
_maxListeners: undefined,
|
||||
_connections: 6,
|
||||
_handle: [Object],
|
||||
_usingSlaves: false,
|
||||
_slaves: [],
|
||||
_unref: false,
|
||||
allowHalfOpen: true,
|
||||
pauseOnConnect: false,
|
||||
httpAllowHalfOpen: false,
|
||||
timeout: 120000,
|
||||
_pendingResponseData: 0,
|
||||
_connectionKey: '6::::3000' },
|
||||
_server:
|
||||
Server {
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 3,
|
||||
_maxListeners: undefined,
|
||||
_connections: 6,
|
||||
_handle: [Object],
|
||||
_usingSlaves: false,
|
||||
_slaves: [],
|
||||
_unref: false,
|
||||
allowHalfOpen: true,
|
||||
pauseOnConnect: false,
|
||||
httpAllowHalfOpen: false,
|
||||
timeout: 120000,
|
||||
_pendingResponseData: 0,
|
||||
_connectionKey: '6::::3000' },
|
||||
_idleTimeout: 120000,
|
||||
_idleNext:
|
||||
Socket {
|
||||
_connecting: false,
|
||||
_hadError: false,
|
||||
_handle: [Object],
|
||||
_parent: null,
|
||||
_host: null,
|
||||
_readableState: [Object],
|
||||
readable: true,
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 10,
|
||||
_maxListeners: undefined,
|
||||
_writableState: [Object],
|
||||
writable: true,
|
||||
allowHalfOpen: true,
|
||||
destroyed: false,
|
||||
bytesRead: 0,
|
||||
_bytesDispatched: 4792,
|
||||
_sockname: null,
|
||||
_pendingData: null,
|
||||
_pendingEncoding: '',
|
||||
server: [Object],
|
||||
_server: [Object],
|
||||
_idleTimeout: 120000,
|
||||
_idleNext: [Object],
|
||||
_idlePrev: [Circular],
|
||||
_idleStart: 5391,
|
||||
parser: [Object],
|
||||
on: [Function: socketOnWrap],
|
||||
_paused: false,
|
||||
read: [Function],
|
||||
_consuming: true,
|
||||
_httpMessage: null,
|
||||
_peername: [Object] },
|
||||
_idlePrev:
|
||||
TimersList {
|
||||
_idleNext: [Circular],
|
||||
_idlePrev: [Object],
|
||||
_timer: [Object],
|
||||
_unrefed: true,
|
||||
msecs: 120000 },
|
||||
_idleStart: 6269,
|
||||
parser:
|
||||
HTTPParser {
|
||||
'0': [Function: parserOnHeaders],
|
||||
'1': [Function: parserOnHeadersComplete],
|
||||
'2': [Function: parserOnBody],
|
||||
'3': [Function: parserOnMessageComplete],
|
||||
'4': [Function: onParserExecute],
|
||||
_headers: [],
|
||||
_url: '',
|
||||
_consumed: true,
|
||||
socket: [Circular],
|
||||
incoming: [Circular],
|
||||
outgoing: null,
|
||||
maxHeaderPairs: 2000,
|
||||
onIncoming: [Function: parserOnIncoming] },
|
||||
on: [Function: socketOnWrap],
|
||||
_paused: false,
|
||||
read: [Function],
|
||||
_consuming: true,
|
||||
_httpMessage:
|
||||
ServerResponse {
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 1,
|
||||
_maxListeners: undefined,
|
||||
output: [],
|
||||
outputEncodings: [],
|
||||
outputCallbacks: [],
|
||||
outputSize: 0,
|
||||
writable: true,
|
||||
_last: false,
|
||||
chunkedEncoding: false,
|
||||
shouldKeepAlive: true,
|
||||
useChunkedEncodingByDefault: true,
|
||||
sendDate: true,
|
||||
_removedHeader: {},
|
||||
_contentLength: null,
|
||||
_hasBody: true,
|
||||
_trailer: '',
|
||||
finished: false,
|
||||
_headerSent: false,
|
||||
socket: [Circular],
|
||||
connection: [Circular],
|
||||
_header: null,
|
||||
_headers: null,
|
||||
_headerNames: {},
|
||||
_onPendingData: [Function: updateOutgoingData],
|
||||
req: [Circular],
|
||||
locals: {} },
|
||||
_peername: { address: '::1', family: 'IPv6', port: 50247 } },
|
||||
_consuming: false,
|
||||
_dumped: false,
|
||||
next: [Function: next],
|
||||
baseUrl: '',
|
||||
originalUrl: '/auth/signin',
|
||||
_parsedUrl:
|
||||
Url {
|
||||
protocol: null,
|
||||
slashes: null,
|
||||
auth: null,
|
||||
host: null,
|
||||
port: null,
|
||||
hostname: null,
|
||||
hash: null,
|
||||
search: null,
|
||||
query: null,
|
||||
pathname: '/auth/signin',
|
||||
path: '/auth/signin',
|
||||
href: '/auth/signin',
|
||||
_raw: '/auth/signin' },
|
||||
params: {},
|
||||
query: {},
|
||||
res:
|
||||
ServerResponse {
|
||||
domain: null,
|
||||
_events: { finish: [Function: resOnFinish] },
|
||||
_eventsCount: 1,
|
||||
_maxListeners: undefined,
|
||||
output: [],
|
||||
outputEncodings: [],
|
||||
outputCallbacks: [],
|
||||
outputSize: 0,
|
||||
writable: true,
|
||||
_last: false,
|
||||
chunkedEncoding: false,
|
||||
shouldKeepAlive: true,
|
||||
useChunkedEncodingByDefault: true,
|
||||
sendDate: true,
|
||||
_removedHeader: {},
|
||||
_contentLength: null,
|
||||
_hasBody: true,
|
||||
_trailer: '',
|
||||
finished: false,
|
||||
_headerSent: false,
|
||||
socket:
|
||||
Socket {
|
||||
_connecting: false,
|
||||
_hadError: false,
|
||||
_handle: [Object],
|
||||
_parent: null,
|
||||
_host: null,
|
||||
_readableState: [Object],
|
||||
readable: true,
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 10,
|
||||
_maxListeners: undefined,
|
||||
_writableState: [Object],
|
||||
writable: true,
|
||||
allowHalfOpen: true,
|
||||
destroyed: false,
|
||||
bytesRead: 0,
|
||||
_bytesDispatched: 6281,
|
||||
_sockname: null,
|
||||
_pendingData: null,
|
||||
_pendingEncoding: '',
|
||||
server: [Object],
|
||||
_server: [Object],
|
||||
_idleTimeout: 120000,
|
||||
_idleNext: [Object],
|
||||
_idlePrev: [Object],
|
||||
_idleStart: 6269,
|
||||
parser: [Object],
|
||||
on: [Function: socketOnWrap],
|
||||
_paused: false,
|
||||
read: [Function],
|
||||
_consuming: true,
|
||||
_httpMessage: [Circular],
|
||||
_peername: [Object] },
|
||||
connection:
|
||||
Socket {
|
||||
_connecting: false,
|
||||
_hadError: false,
|
||||
_handle: [Object],
|
||||
_parent: null,
|
||||
_host: null,
|
||||
_readableState: [Object],
|
||||
readable: true,
|
||||
domain: null,
|
||||
_events: [Object],
|
||||
_eventsCount: 10,
|
||||
_maxListeners: undefined,
|
||||
_writableState: [Object],
|
||||
writable: true,
|
||||
allowHalfOpen: true,
|
||||
destroyed: false,
|
||||
bytesRead: 0,
|
||||
_bytesDispatched: 6281,
|
||||
_sockname: null,
|
||||
_pendingData: null,
|
||||
_pendingEncoding: '',
|
||||
server: [Object],
|
||||
_server: [Object],
|
||||
_idleTimeout: 120000,
|
||||
_idleNext: [Object],
|
||||
_idlePrev: [Object],
|
||||
_idleStart: 6269,
|
||||
parser: [Object],
|
||||
on: [Function: socketOnWrap],
|
||||
_paused: false,
|
||||
read: [Function],
|
||||
_consuming: true,
|
||||
_httpMessage: [Circular],
|
||||
_peername: [Object] },
|
||||
_header: null,
|
||||
_headers: null,
|
||||
_headerNames: {},
|
||||
_onPendingData: [Function: updateOutgoingData],
|
||||
req: [Circular],
|
||||
locals: {} },
|
||||
route:
|
||||
Route {
|
||||
path: '/auth/signin',
|
||||
stack: [ [Object] ],
|
||||
methods: { post: true } } }
|
Loading…
Reference in a new issue