Qwik City Bun middleware allows you to hook up Qwik City to a Bun server which uses the Bun Http API.
bun on Linux, OSX or WSL run the following command in your terminal
curl -fsSL https://bun.sh/install | bash
For other platforms or if you run into issues with installation, up to date
bun installation instructions can be found on the bun website.
If you run into the error
Something went wrong installing the "sharp" module when using
bun as a package manager, add the following code to your package.json, then remove the node_modules folder and any lockfiles such as bun.lockb or package-lock.json. Then run
This issue is currently being tracked on the bun repository.
To integrate the
bun adapter, use the
- For the integrated HTTP server:
bun run qwik add bun
To build the application for production, use the
build command, this command will automatically run
bun run build.server and
bun run build.client:
bun run build
To start the Bun server after a build:
bun run serve
Since you are choosing Bun, here you are in your own, after running
bun run build:
distfolder will be created including all the static files.
serverfolder will be created including all bun server files.