From a5143ddab1185505a10d134fee7f8ee049879a27 Mon Sep 17 00:00:00 2001 From: Petter Machado Date: Tue, 8 Oct 2024 15:20:31 +0200 Subject: [PATCH] fix: Adds a new section on building the app for production. (#11) * fix: Adds a new section on building the app for production. * fix: pnpm format --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index ffff223..1579365 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,19 @@ cp .env.sample .env This app does not enforce any authentication, **do not put this app on the internet**. +### Building + +The app contains two moving parts as described in [Project setup](#project-setup): the user facing React app and the server. These two needs to be built separately. To produce JavaScript files that can be run with plain `node` you can run the follwing two scrips defined in `package.json`. + +- `pnpm build:remix` Builds the React app and puts the final output in `./build`. +- `pnpm build:server` Builds the server and puts it in `./build-server`. This step depends on the `pnpm build:remix` step. + +After successfully running the commands above the app can be started with + +```shell +node ./build-server/server.js +``` + ### App container Every running environment is different, but to help getting this app deployed `./example.Dockerfile` will produce an image that runs the app.