Bun Server
Brisa by default is a Bun.js web service application. This means that when you run brisa build
, Brisa generates a Bun server that serves your application on the port 3000 by default, it can be changed with the flag --port
.
This server is capable of serving your application with all the features that Brisa offers, such as i18n, routing, server actions and middleware.
Configuration (Optional)
To enable a web service application, change the output mode inside brisa.config.ts
(optional since it is the default value):
import type { Configuration } from "brisa";
export default {
output: "bun", // It is the default value
} satisfies Configuration;
After running brisa build
, Brisa will generate a Bun server that serves your application on the port 3000 by default.
Changing the port
To change the port, you can use the flag --port
:
brisa start --port 8080
The default port is
process.env.PORT
or3000
.
After running brisa build
, Brisa will generate a Bun server that serves your application on the port 8080.
If you want, you can use
NODE_ENV=production bun run build/server.js
to start your application with Bun.js without Brisa CLI.
Custom server
If you want to use a custom server, you can follow this guide: Custom Server.