I've been working to deploy my app to Heroku but keep running into an H10 error. The app works locally but no luck deploying to Heroku.
Here is the index.js:
import express from 'express'
import 'dotenv/config'
import router from './routes/index.js'
import morgan from 'morgan'
const app = express()
const port = process.env.PORT || 5000
app.use('/public', express.static('public'))
app.use(express.urlencoded({ extended: false }))
app.use(express.json())
app.use(morgan('dev'))
app.use('/', router)
app.listen(process.env.PORT || port)
Here is my Procfile:
web: node index.js
Here is the package.json:
{
"name": "node-sso-example-app",
"version": "1.0.0",
"description": "Example Node.js SSO App using WorkOS",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node index.js"
},
"author": "WorkOS",
"dependencies": {
"express": "^4.18.1",
"ejs": "^3.1.8",
"router": "^1.3.7",
"dotenv": "^16.0.1",
"@workos-inc/node": "^2.11.0",
"morgan": "^1.10.0",
"cookie-parser": "^1.4.6",
"express-session": "^1.17.2",
"http-errors": "~1.6.3"
},
"devDependencies": {
"nodemon": "^2.0.19"
},
"engines": {
"node": "^16.17.0"
}
}
I'm stuck at this point and have read through what feels like every Stackoverflow question on this same error with no luck.