How it works
Rebasable detects Node from package.json, runs npm ci, then starts npm start. The app listens on the PORT variable the platform sets. A new deploy only gets traffic after GET /healthz answers 200; the old instance then gets SIGTERM, and server.close() lets in-flight requests finish.
Run it locally
npm install
npm run dev # http://localhost:3000
Use it as your own repository
Copy the express folder of the templates repository into a new repo (the files at the root, rebasable.yaml included) and push it. Then add a Deploy button to its README, or create it from Blueprints, New blueprint in the dashboard. From then on, every push deploys, and pull requests get preview environments.
Good to know
- Add a database: put a
databases:entry inrebasable.yamland readDATABASE_URLwithfromDatabase(see the Django template). - The free instance sleeps after 15 minutes without traffic and wakes in about 1 to 2 seconds. Starter and above never sleep.