정승호

오탈자 수정

...@@ -4,7 +4,7 @@ const app = express() ...@@ -4,7 +4,7 @@ const app = express()
4 const bodyParser = require('body-parser'); 4 const bodyParser = require('body-parser');
5 const port = 5000 5 const port = 5000
6 6
7 -const { User } = require('./models/Users'); 7 +const {User} = require('./models/Users');
8 8
9 app.use(bodyParser.urlencoded({extended : true})); 9 app.use(bodyParser.urlencoded({extended : true}));
10 app.use(bodyParser.json()); 10 app.use(bodyParser.json());
......
...@@ -11,7 +11,7 @@ const userSchema = mongoose.Schema({ ...@@ -11,7 +11,7 @@ const userSchema = mongoose.Schema({
11 }, 11 },
12 password :{ 12 password :{
13 type : String, 13 type : String,
14 - minlength : 50 14 + maxlength : 50
15 }, 15 },
16 lastname:{ 16 lastname:{
17 type : String, 17 type : String,
...@@ -26,14 +26,14 @@ const userSchema = mongoose.Schema({ ...@@ -26,14 +26,14 @@ const userSchema = mongoose.Schema({
26 type : String 26 type : String
27 }, 27 },
28 tokenExp :{ 28 tokenExp :{
29 - type: Number, 29 + type: Number
30 } 30 }
31 31
32 }) 32 })
33 33
34 -const Users = mongoose.model('Users', userSchema) 34 +const User = mongoose.model('Users', userSchema)
35 35
36 36
37 37
38 -module.exports = {Users} 38 +module.exports = {User}
39 39
......
This diff is collapsed. Click to expand it.
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
16 "dependencies": { 16 "dependencies": {
17 "body-parser": "^1.19.0", 17 "body-parser": "^1.19.0",
18 "express": "^4.17.1", 18 "express": "^4.17.1",
19 - "mongoose": "^5.9.15" 19 + "mongoose": "^5.9.15",
20 + "nodemon": "^2.0.4"
20 } 21 }
21 } 22 }
......