2025-02-05 12:20:53 +01:00
|
|
|
# Express hello world
|
|
|
|
|
|
|
|
|
|
A joke application.
|
|
|
|
|
|
2025-02-14 23:45:58 +01:00
|
|
|
## How to set up dev environment
|
2025-02-05 12:20:53 +01:00
|
|
|
|
2025-02-14 23:45:58 +01:00
|
|
|
* Pre-requisites
|
|
|
|
|
+ `docker` and `docker compose`
|
|
|
|
|
+ `node` and `npm`
|
|
|
|
|
* Run `npm install`
|
|
|
|
|
* You can now start the app in a container by running `npm run start:containers` (and shut it down with `npm run stop:containers`).
|
2025-02-05 12:20:53 +01:00
|
|
|
|
2025-02-14 23:45:58 +01:00
|
|
|
## How to test
|
2025-02-05 13:21:00 +01:00
|
|
|
|
2025-02-14 23:45:58 +01:00
|
|
|
* Run `npm run test`
|
2025-02-05 13:21:00 +01:00
|
|
|
|
2025-02-14 23:45:58 +01:00
|
|
|
## How to deploy
|
|
|
|
|
|
|
|
|
|
The app has never been deployed in production, so there's a lot of things to polish.
|
|
|
|
|
|
|
|
|
|
The (hypothetical) approach is to:
|
|
|
|
|
* Spin up a linux box.
|
|
|
|
|
* Install node, caddy and postgres.
|
|
|
|
|
* Configure them all nice and stuff so they work together and have a reasonable production set up.
|
|
|
|
|
* Set up the node app with systemd so it runs proper.
|
|
|
|
|
|
|
|
|
|
## Other
|
|
|
|
|
|
|
|
|
|
* You can format with `npm run format` and lint with `npm run lint`.
|