Showing
7 changed files
with
38 additions
and
4 deletions
... | @@ -32,5 +32,6 @@ babel을 통해 내 최신js 코드를 호환성이 좋은 구 버전 js코드 | ... | @@ -32,5 +32,6 @@ babel을 통해 내 최신js 코드를 호환성이 좋은 구 버전 js코드 |
32 | 32 | ||
33 | /movies: 영화 보여주는 페이지 | 33 | /movies: 영화 보여주는 페이지 |
34 | /movies/:id 영화 상세정보 | 34 | /movies/:id 영화 상세정보 |
35 | + | ||
35 | /users/:id 사용자 상세정보 | 36 | /users/:id 사용자 상세정보 |
36 | /users/likemovie 사용자가 좋아하는 영화 목록 | 37 | /users/likemovie 사용자가 좋아하는 영화 목록 |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
backend/controllers/globalController.js
0 → 100644
1 | +export const home = (req,res)=>{ | ||
2 | + return res.send("hello this is homepage!"); | ||
3 | +} | ||
4 | + | ||
5 | +export const join= (req,res) =>{ | ||
6 | + return res.send("hello this is joinpage!"); | ||
7 | +} | ||
8 | + | ||
9 | +export const login = (req,res)=>{ | ||
10 | + return res.send("hello this is login!"); | ||
11 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
backend/controllers/movieController.js
0 → 100644
backend/routers/globalRouter.js
0 → 100644
1 | +import express from "express"; | ||
2 | +import {home,join,login} from "../controllers/globalController" | ||
3 | +const globalRouter = express.Router(); | ||
4 | + | ||
5 | +globalRouter.get('/',home); | ||
6 | +globalRouter.get('/join',join); | ||
7 | +globalRouter.get('/login',login); | ||
8 | +export default globalRouter | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
backend/routers/movieRouter.js
0 → 100644
1 | import express from "express" | 1 | import express from "express" |
2 | - | 2 | +import global from "./routers/globalRouter"; |
3 | -const app = express(); | 3 | +import movies from "./routers/movieRouter"; |
4 | 4 | ||
5 | const PORT = 3000 | 5 | const PORT = 3000 |
6 | +const app = express(); | ||
7 | +app.use('/',global); | ||
8 | +app.use('/movies',movies); | ||
6 | 9 | ||
7 | -app.listen(PORT,() => console.log(`The Server is running on http://localhost:${PORT} 🚀`)) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
10 | +app.listen(PORT,() => console.log(`The Server is running on http://localhost:${PORT}`)); | ... | ... |
-
Please register or login to post a comment