Skip to content
Snippets Groups Projects
Commit cbc8e18e authored by Matt Kirby's avatar Matt Kirby
Browse files

routes initalisation

parent 52f95eec
No related branches found
No related tags found
1 merge request!15Add Friend service
import express, { Application } from 'express'
import { authorize } from '../Middleware/Auth'
import { IndexRouter } from '../Routes'
import { FriendsRouter } from '../Routes/FriendsRouter'
import { RequestRouter } from '../Routes/RequestsRouter'
/**
* Load the application endpoints
* @param app
*/
export const initializeRoutes = (app: Application) => {
app.use(express.json())
// load index routes
app.use('/', IndexRouter)
//Other routes
app.use('/friends', authorize, FriendsRouter)
app.use('/friends/requests', authorize, RequestRouter)
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment