Skip to content

Commit

Permalink
json-server-auth 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
minhanPark committed Jun 29, 2022
1 parent 358ef08 commit 36efec7
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 5 deletions.
18 changes: 15 additions & 3 deletions db.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
{
"users": [
{
"email": "firstman@email.com",
"password": "$2a$10$uT0E.SM7RvUvwC3OKzgcHOFOSCW2fV9d4bBcYpdacgNsoOjwnP0GG",
"id": 1
},
{
"email": "secondman@email.com",
"password": "$2a$10$HM1nXlgPQhPCW9njN9IX3uDT3HpCubK57g4nOAI5Afpbwj3AxdVSm",
"id": 2
}
],
"todos": [
{
"id": 2,
"description": "시리즈 읽어보기",
"isCompleted": true
"userId": 1,
"description": "todos check",
"id": 1
}
]
}
121 changes: 121 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"server": "json-server --watch db.json --port 4444"
"server": "json-server-auth --watch db.json --port 4444 -r routes.json"
},
"eslintConfig": {
"extends": [
Expand All @@ -38,6 +38,7 @@
]
},
"devDependencies": {
"json-server": "^0.17.0"
"json-server": "^0.17.0",
"json-server-auth": "^2.1.0"
}
}
4 changes: 4 additions & 0 deletions routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"users": 600,
"todos": 600
}

0 comments on commit 36efec7

Please sign in to comment.