1
0
CompleteNodeJS/task-manager/src/index.js

16 lines
351 B
JavaScript
Raw Normal View History

const express = require('express')
require('./db/mongoose')
2020-02-24 01:16:01 +00:00
const userRouter = require('./routers/user')
const taskRouter = require('./routers/task')
const app = express()
const port = process.env.PORT || 4200
app.use(express.json())
2020-02-24 01:16:01 +00:00
app.use(userRouter)
app.use(taskRouter)
2020-02-24 00:45:13 +00:00
app.listen(port, () => {
console.log('Server is up on port ' + port)
})