Toggle navigation
Toggle navigation
This project
Loading...
Sign in
공태현
/
healthcare-with-webcam
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
공태현
2022-05-31 01:51:37 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f615ba687db1eb4a4dddf9f7f200e978cbeb2908
f615ba68
1 parent
8b3e3b33
Install mongoose and Write user-schema
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
mongodb.js
package.json
mongodb.js
0 → 100644
View file @
f615ba6
const
mongoose
=
require
(
'mongoose'
);
const
userSchema
=
new
mongoose
.
Schema
({
name
:
{
type
:
String
,
required
:
true
,
unique
:
true
,
},
password
:
{
type
:
String
,
required
:
true
,
trim
:
true
},
});
module
.
exports
=
mongoose
.
model
(
'squartuser'
,
userSchema
)
package.json
View file @
f615ba6
...
...
@@ -5,7 +5,7 @@
"main"
:
"server.js"
,
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"start"
:
"node server.js"
"start"
:
"node server.js"
},
"repository"
:
{
"type"
:
"git"
,
...
...
@@ -14,6 +14,7 @@
"author"
:
""
,
"license"
:
"ISC"
,
"dependencies"
:
{
"express"
:
"^4.18.1"
"express"
:
"^4.18.1"
,
"mongoose"
:
"^6.3.4"
}
}
...
...
Please
register
or
login
to post a comment