sync
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
import express from 'express'
|
||||
|
||||
// routes
|
||||
import { matchRouter } from './routes/matches.route.js'
|
||||
|
||||
const app = express()
|
||||
|
||||
const port = process.env.PORT || 8081
|
||||
|
||||
app.use(express.json())
|
||||
|
||||
app.get('/',(req,res)=>{
|
||||
app.get('/',(_,res)=>{
|
||||
res.send('Hello from express server!')
|
||||
})
|
||||
|
||||
app.use('/matches', matchRouter)
|
||||
|
||||
app.listen(port, ()=>{
|
||||
console.log(`Listening on port ${port}`)
|
||||
console.info(`Listening on port ${port}`)
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user