globalRouter.js 579 Bytes
Newer Older
KangMin An's avatar
KangMin An committed
1
2
import express from "express";
import routes from "../routes";
3
import { getHome } from "../controllers/globalController";
4
5
6
7
8
9
import {
  getLogin,
  getSignup,
  postLogin,
  postSignup,
} from "../controllers/userController";
KangMin An's avatar
KangMin An committed
10
11
12
13
14

const globalRouter = express.Router();

globalRouter.get(routes.home, getHome);

15
16
17
18
19
20
// Authentication
globalRouter.get(routes.signup, getSignup); // For development test.
globalRouter.get(routes.login, getLogin); // For development test.
globalRouter.post(routes.signup, postSignup);
globalRouter.post(routes.login, postLogin);

KangMin An's avatar
KangMin An committed
21
export default globalRouter;