Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var userSchema = mongoose.Schema({
- userData: {
- name: { type: String, required: true, unique: true },
- password: String
- },
- notes: [ String ],
- contacts: [{
- name: String,
- notes: [ String ]
- }],
- locations: [ String ]
- });
- each user in allUsers
- p #{user.userData.name}
- app.get('/', function(req, res) {
- if (app.locals.userData.name) {
- res.render('app', {
- currentUser: app.locals.userData,
- allUsers: User.find({})
- });
- } else {
- res.redirect('signup');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement