I’m trying to deploy a NodeJS app but I have no success, this is my configuration
I’ve simplified the index file to test this with a simple .get endpoint, in local it works but when trying to deploy it stays a lot with this message and then this error
==> Monitoring deployment
1 desired, 1 placed, 0 healthy, 0 unhealthy
And the error
1 desired, 1 placed, 0 healthy, 1 unhealthy
--> v6 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v7
--> Troubleshooting guide at https://fly.io/docs/getting-started/troubleshooting/
Error abort
Configuration files
file: fly.toml
# fly.toml file generated for api on 2022-05-04T14:49:51+02:00
app = "api"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[build]
builder = "heroku/buildpacks:20"
[env]
PORT = "8080"
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = false
handlers = ["http"]
port = 8080
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
file: index.ts
import cors from '@koa/cors'
import Koa from 'koa'
import bodyParser from 'koa-bodyparser'
import Router from 'koa-router'
const server = new Koa()
const router = new Router({})
router.get('/', (ctx) => {
ctx.body = { status: 1 }
})
server
.use(cors({ credentials: true, allowHeaders: '' }))
.use(bodyParser())
.use(router.routes())
server.listen(8080, () => console.log(`Success`))