Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Adds a new section on building the app for production. #11

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,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.
Expand Down