Frameworks and runtimes
What Rimbra detects, the command it runs for each language, and what your app needs to start.
The one rule for servers
If your app is a server, listen on the port in the PORT environment variable. Rimbra picks the port, sets PORT, and routes your domain to it.
js / python
// Node.js
const port = process.env.PORT || 3000
app.listen(port)
# Python
port = int(os.environ.get("PORT", 8000))What Rimbra detects
| Your files | Detected as | How it runs |
|---|---|---|
| package.json with next | Next.js | Builds, then runs the Next.js server |
| Vite, Astro, SvelteKit, Nuxt config | Frontend framework | Builds and serves the output |
| index.html | Static site | Served as files |
| package.json with a start script or server.js (Express, Fastify, Koa, NestJS, Hono) | Node server | npm start, or node on your entry file |
| requirements.txt or pyproject.toml | Python | Uvicorn for FastAPI, Gunicorn for Flask, runserver for Django |
| composer.json or index.php | PHP | PHP serving public/ or the project root |
| go.mod | Go | go build, then runs the binary |
| Cargo.toml | Rust | cargo build --release, then runs the binary |
| Gemfile with config.ru | Ruby | bundle exec rackup |
| pom.xml or build.gradle | Java | Maven package or Gradle bootJar, then java -jar |
| Dockerfile | Container | Builds the image and runs it with PORT set |
Python
- List dependencies in requirements.txt or pyproject.toml.
- Put your app in main.py, app.py, server.py or run.py, or use Django’s manage.py.
- For FastAPI, expose app = FastAPI(). Rimbra runs uvicorn main:app.
- For Flask, expose app = Flask(__name__) and include gunicorn or flask in your dependencies.
Node.js
- With a start script, Rimbra runs npm start (or the package manager your lockfile uses).
- Without one, it runs the file in "main", then server.js, index.js or app.js.
- Commit your lockfile so installs are fast and repeatable.
Express
An Express app deploys as a Node server with no setup. Add a start script and listen on PORT. The same goes for Fastify, Koa, NestJS and Hono.
- Connect a database to the project and DATABASE_URL is set for you, ready for pg, Prisma or Drizzle.
- Using TypeScript? Add a build script (for example tsc) and start the compiled file: "start": "node dist/server.js".
- An Express API and a frontend in one repo deploy as two projects. Set each one’s Root directory, for example /api and /web.
- Add environment variables in project Settings; they are available as process.env on the next deploy.
js
// server.js
const express = require("express")
const app = express()
app.use(express.json())
app.get("/", (req, res) => res.send("Hello from Rimbra"))
app.listen(process.env.PORT || 3000)
// package.json
{
"scripts": { "start": "node server.js" },
"dependencies": { "express": "^4.19.2" }
}Override the commands
Open project Settings to set your own Root directory, Install command, Build command, Start command and Port. They are used from the next deployment.
| Setting | Default |
|---|---|
| Root directory | / |
| Install command | npm ci |
| Build command | npm run build |
| Start command | npm run start |
