UNPKG
fruitstand
Version:
latest (0.0.1)
0.0.1
fruit stand
github.com/classmember/fruitstand
classmember/fruitstand
fruitstand
/
examples
/
nodejs-mongodb-angularjs-web-development
/
ch26
/
models
/
users_model.js
9 lines
•
247 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
var
mongoose =
require
(
'mongoose'
),
Schema
= mongoose.
Schema
;
var
UserSchema
=
new
Schema
({
username
: {
type
:
String
,
unique
:
true
},
email
:
String
,
color
:
String
,
hashed_password
:
String
}); mongoose.
model
(
'User'
,
UserSchema
);