axios response return html not json data

Solutions on MaxInterview for axios response return html not json data by the best coders in the world

showing results for - "axios response return html not json data"
Elaine
15 Aug 2019
1// use this after route not before route
2if (process.env.NODE_ENV === 'production') {
3  app.use(express.static(resolve(process.cwd(), 'client/build')))
4  app.get('*', (req, res) => {
5    res.sendFile(resolve(process.cwd(), 'client/build/index.html'))
6  })
7}
similar questions
queries leading to this page
axios response return html not json data