File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ import express from 'express'
33import morgan from 'morgan'
44import cors from 'cors'
55
6+ import passport from 'passport'
7+ import middlewarePassport from './midlewares/passport'
8+
69import authRoute from './routes/auth.routes'
710
811const app = express ( )
@@ -16,6 +19,10 @@ app.use(morgan('dev'))
1619app . use ( express . json ( ) )
1720app . use ( express . urlencoded ( { extended : false } ) )
1821
22+ //Passport
23+ app . use ( passport . initialize ( ) )
24+ passport . use ( middlewarePassport )
25+
1926//Routes
2027app . use ( '/api/auth' , authRoute )
2128
Original file line number Diff line number Diff line change 11import { Router } from 'express'
22import { signIn , signUp } from '../controllers/auth/auth.controller'
33
4+
45const router = Router ( )
56
67router . post ( '/signin' , signIn )
78router . post ( 'signup' , signUp )
9+ //router.get('/profile', )
810
911
1012export default router
You can’t perform that action at this time.
0 commit comments