Node.js Example
This flightcontrol.json
example is for a standard Node.js project - for instance, one based on Express.
You may need to edit the buildCommand
or startCommand
based on what your particular Node.js application uses.
{
"environments": [
{
"id": "production",
"name": "Production",
"region": "us-west-2",
"source": {
"branch": "main"
},
"services": [
{
"id": "my-webapp",
"name": "My Webapp",
"type": "fargate",
"cpu": 0.25,
"memory": 0.5,
"domain": "www.example.com",
"minInstances": 1,
"maxInstances": 1,
"buildCommand": "npm run build",
"startCommand": "npm run start",
"envVariables": {
"DATABASE_URL": {
"fromService": {
"id": "db",
"value": "dbConnectionString"
}
}
}
},
{
"id": "db",
"name": "Database",
"type": "rds",
"engine": "postgres",
"engineVersion": "12",
"instanceSize": "db.t4g.micro",
"storage": 20,
"private": false
}
]
}
]
}