From 495787dc7e8ac23fdf685f68e011750527d5f867 Mon Sep 17 00:00:00 2001 From: azure Date: Sun, 16 Feb 2025 07:40:25 -0500 Subject: [PATCH] [no ci] docs(readme): update "building for production" section --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 78e96e8..ae9eead 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,16 @@ This will start a development server. Open your browser and navigate to `http:// Before building for production, make sure you create a `.env` file in the root of the project with the following content: ```sh -PUB_HOSTNAME=vert.sh # change to your domain +PUB_HOSTNAME=vert.sh # change to your domain, only gets used for Plausible (for now) PUB_PLAUSIBLE_URL=https://plausible.example.com # can be empty if not using Plausible +PUB_ENV=production # "production", "development" or "nightly" ``` To build the project for production, run `bun run build` -This will build the site to the `build` folder. You can then start the server with `bun ./build/index.js` and navigate to `http://localhost:3000` to see the application. +This will build the site to the `build` folder. You should then use a web server like [nginx](https://nginx.org) to serve the files inside that folder. + +If using nginx, you can use the [nginx.conf](./nginx.conf) file as a starting point. Make sure you keep [cross-origin isolation](https://web.dev/articles/cross-origin-isolation-guide) enabled. ### With Docker