A nice introduction to my chaos
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
const express = require('express')
|
|
const cors = require('cors')
|
|
|
|
const app = express()
|
|
|
|
app.use(cors())
|
|
|
|
const posts = require('./routes/api/posts')
|
|
|
|
app.use('/posts', posts)
|
|
|
|
const port = process.env.PORT || 5000
|
|
|
|
app.listen(port, () => console.log(`Server started on port ${port}`))
|
|
|