Last active
August 6, 2017 18:02
-
-
Save WillieYang/deb945b9dacaa5b7be2ee017a7556bfd to your computer and use it in GitHub Desktop.
HTTP error: status code ~ 500
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| responseBody[object Object],[object Object],[object Object] | |
| These two vars are equal. | |
| GET /locationlist/ 500 197.178 ms - 1964 | |
| GET /bootstrap/css/pulse.bootstrap.css 304 1.410 ms - - | |
| // Why would this error happen? | |
| // The reason might be that the data in the view cannot match the controller. | |
| GET / 500 19.940 ms - 1838 | |
| GET /bootstrap/css/pulse.bootstrap.css 304 1.349 ms - - | |
| GET /stylesheets/style.css 304 1.262 ms - - | |
| // the reason why above erro existed is that the jade only support space rather than tab. | |
| User Registration succesful | |
| serializing user: | |
| { __v: 0, | |
| email: 'Alice@gmail.com', | |
| password: '$2a$10$25ijkG/tldNNCanzPtKeiOpHl8axF5rH3BER8KFDDmQ6fYooXD3IS', | |
| username: 'AliceYang', | |
| _id: 5974c986dea685349a68242a } | |
| POST /users/signup 302 361.998 ms - 70 | |
| GET /users/login/ 500 144.960 ms - 2136 | |
| // this kind of error also happens when I use the passport.js to build the use authentication. | |
| // the main reason is that I have imported the user model in a wrong way: | |
| var mongoose = require('mongoose'); | |
| var User = mongoose.model('User'); | |
| // rather than: | |
| var User = require('../users'); | |
| // for I have compiled the Schema to the model using: | |
| mongoose.model('User', UserSchema); | |
| // and I did not use code below: | |
| module.exports = mongoose.model('User', userSchema); | |
Author
Author
We can using arrow and select button to find out whether the lines are space or tab
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In fact, it is the indent problem of jade.