CONFLICTZ
This commit is contained in:
parent
f5c3a13fde
commit
4de7102c30
16
index.js
16
index.js
@ -6,7 +6,8 @@ const ascii = require('./ascii')
|
|||||||
const port = process.env.PORT || 1337
|
const port = process.env.PORT || 1337
|
||||||
|
|
||||||
app.use(morgan('tiny'))
|
app.use(morgan('tiny'))
|
||||||
|
YOU HAVE NO CHANCE TO SURVIVE MAKE YOUR TIME
|
||||||
|
HA HA HA
|
||||||
// body parsing middleware
|
// body parsing middleware
|
||||||
app.use(express.json())
|
app.use(express.json())
|
||||||
app.use(express.urlencoded({ extended: true }))
|
app.use(express.urlencoded({ extended: true }))
|
||||||
@ -17,6 +18,19 @@ if (process.env.NODE_ENV === 'production') {
|
|||||||
// Express will serve up production assets
|
// Express will serve up production assets
|
||||||
app.use(express.static(path.join(__dirname, '..', 'client', 'build')))
|
app.use(express.static(path.join(__dirname, '..', 'client', 'build')))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// app.get('/articles', async (req, res, next) => {
|
||||||
|
// try {
|
||||||
|
// const articles = await Article.findAll()
|
||||||
|
// console.log(articles)
|
||||||
|
|
||||||
|
// res.status(201).send(articles)
|
||||||
|
// } catch (err) {
|
||||||
|
// next(err)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
app.get('*', (req, res) =>
|
app.get('*', (req, res) =>
|
||||||
res.sendFile(path.resolve(__dirname, '..', 'client', 'public', 'index.html'))
|
res.sendFile(path.resolve(__dirname, '..', 'client', 'public', 'index.html'))
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user