I am deploying a React app but am getting a strange error when I visit the page over https.
When I visit the page over https I receive the following error:
S
const express = require('express')
const path = require('path')
const app = express()
if (process.env.NODE_ENV === 'production') {
// Serve any static files
app.use(express.static(path.join(__dirname, 'client/build')))
// Handle React routing, return all requests to React app
app.get('*', (request, response) => {
response.sendFile(path.join(__dirname, 'client/build', 'index.html'))
})
}
const port = process.env.PORT || 8080
app.listen(port, () => {
console.log(`API listening on port ${port}...`)
})
,
"scripts": {
"start": "node server.js",
"heroku-postbuild": "cd client && yarn && yarn run build"
}
"proxy": "http://localhost:8080"