File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import express from 'express'
33import morgan from 'morgan'
44import cors from 'cors'
55
6+ import authRoute from './routes/auth.routes'
7+
68const app = express ( )
79
810//Settings
@@ -15,6 +17,8 @@ app.use(express.json())
1517app . use ( express . urlencoded ( { extended : false } ) )
1618
1719//Routes
20+ app . use ( '/api/auth' , authRoute )
21+
1822app . get ( '/' , ( req , res ) => {
1923 res . send ( `The API is at http://127.0.0.1:${ app . get ( 'port' ) } ` )
2024} )
Original file line number Diff line number Diff line change 1+ import { Request , Response } from 'express'
2+ import User , { IUser } from '../../models/User'
3+
4+ export const signUp = ( req : Request , res : Response ) => {
5+
6+ }
7+
8+ export const signIn = ( req : Request , res : Response ) => {
9+
10+ }
Original file line number Diff line number Diff line change 1+ import { Router } from 'express'
2+ import { signIn , signUp } from '../controllers/auth/auth.controller'
3+
4+ const router = Router ( )
5+
6+ router . post ( '/signin' , signIn )
7+ router . post ( 'signup' , signUp )
8+
9+
10+ export default router
You can’t perform that action at this time.
0 commit comments