Showing
8 changed files
with
58 additions
and
3 deletions
... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
21 | | group | description | method | URL | Detail | Auth | | 21 | | group | description | method | URL | Detail | Auth | |
22 | | ------- | ------------------------ | ------ | -------------------------- | -------- | --------- | | 22 | | ------- | ------------------------ | ------ | -------------------------- | -------- | --------- | |
23 | | user | 유저 등록 | POST | api/user | 바로가기 | JWT Token | | 23 | | user | 유저 등록 | POST | api/user | 바로가기 | JWT Token | |
24 | -| user | 유저 삭제 | DEELTE | api/user:id | 바로가기 | JWT Token | | 24 | +| user | 유저 삭제 | DELETE | api/user:id | 바로가기 | JWT Token | |
25 | | user | 특정 유저 조회 | GET | api/user:id | 바로가기 | None | | 25 | | user | 특정 유저 조회 | GET | api/user:id | 바로가기 | None | |
26 | | user | 전체 유저 조회 | GET | api/user | 바로가기 | JWT Token | | 26 | | user | 전체 유저 조회 | GET | api/user | 바로가기 | JWT Token | |
27 | | friend | 유저 친구 등록 | POST | api/friend | 바로가기 | JWT Token | | 27 | | friend | 유저 친구 등록 | POST | api/friend | 바로가기 | JWT Token | | ... | ... |
... | @@ -2,6 +2,7 @@ const express = require("express"); | ... | @@ -2,6 +2,7 @@ const express = require("express"); |
2 | const morgan = require("morgan"); | 2 | const morgan = require("morgan"); |
3 | const mongoose = require("mongoose"); | 3 | const mongoose = require("mongoose"); |
4 | const app = express(); | 4 | const app = express(); |
5 | +const api = require("./src/api"); | ||
5 | require("dotenv").config(); | 6 | require("dotenv").config(); |
6 | const { SERVER_PORT, MONGO_URL } = process.env; | 7 | const { SERVER_PORT, MONGO_URL } = process.env; |
7 | app.use( | 8 | app.use( |
... | @@ -9,8 +10,7 @@ app.use( | ... | @@ -9,8 +10,7 @@ app.use( |
9 | ); | 10 | ); |
10 | app.use(express.json()); | 11 | app.use(express.json()); |
11 | app.use(express.urlencoded({ extended: false })); | 12 | app.use(express.urlencoded({ extended: false })); |
12 | -app.use("/api", require("./api")); | 13 | +app.use("/api", api); |
13 | - | ||
14 | mongoose | 14 | mongoose |
15 | .connect(MONGO_URL, { useNewUrlParser: true, useFindAndModify: false }) | 15 | .connect(MONGO_URL, { useNewUrlParser: true, useFindAndModify: false }) |
16 | .then(() => { | 16 | .then(() => { | ... | ... |
jaksimsamil-server/src/api/auth/index.js
0 → 100644
jaksimsamil-server/src/api/friend/index.js
0 → 100644
1 | +const express = require("express"); | ||
2 | +const app = express(); | ||
3 | + | ||
4 | +const auth = require("./auth"); | ||
5 | +const friend = require("./friend"); | ||
6 | +const notify = require("./profile"); | ||
7 | +const user = require("./user"); | ||
8 | +const profile = require("./profile"); | ||
9 | + | ||
10 | +app.use("/auth", auth); | ||
11 | +app.use("/friend", friend); | ||
12 | +app.use("/notify", notify); | ||
13 | +app.use("/user", user); | ||
14 | +app.use("/profile", profile); | ||
15 | + | ||
16 | +module.exports = app; | ... | ... |
jaksimsamil-server/src/api/notify/index.js
0 → 100644
jaksimsamil-server/src/api/profile/index.js
0 → 100644
-
Please register or login to post a comment