From bc3ed21da4a83b3cc1a8e37f7e24cf90ad2a4b08 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Mon, 17 Mar 2025 16:01:02 +0100 Subject: [PATCH] a few small notes --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index de7c287..6098e02 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,16 @@ laseca is a social bitcoin to cash exchange, implemented as a webapp. * Installing + Run `npm install` + You can now start the app in a container by running `npm run start:container` (and shut it down with `npm run stop:container`). +* Building + + The front-end code gets built with webpack. You can build it anytime with `npm run build`. + + For development, it's useful to build continuously. You can run `npm run watch` and webpack will build every time you edit a monitored file. * Running + Copy the `.env.dist` file into `.env` and set any values you like. + The app will run in a single container, with a Postgres database, a caddy webserver and the nodejs app. + Note that the container doesn't come with a volume for Postgres: default behaviour is to start from scratch every time you create the container, delete everything every time you delete the container. + + You probably want to run migrations to get the database into proper state. You can do so with `npx sequelize-cli db:migrate`. + The docker image launches the nodejs app with nodemon, so changes to the code will be available immediately. + + Furthermore, since the git repository gets mounted live into the docker container, the live changes made by webpack watch mode will also be available as you work on front end files. + The Postgres database is reachable from the host, so you can use your favourite SQL client to access it. + You can format with `npm run format` and lint with `npm run lint`.