1
0
CompleteNodeJS/task-manager/src/index.js
2020-02-23 18:16:01 -07:00

16 lines
351 B
JavaScript

const express = require('express')
require('./db/mongoose')
const userRouter = require('./routers/user')
const taskRouter = require('./routers/task')
const app = express()
const port = process.env.PORT || 4200
app.use(express.json())
app.use(userRouter)
app.use(taskRouter)
app.listen(port, () => {
console.log('Server is up on port ' + port)
})