From e6c46d75dc63b450bd8709d963d298e87d8f906c Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Tue, 31 May 2022 01:46:22 +0200 Subject: [PATCH] Aggiunto come impostare l'ambiente di development per il js --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c5f65b4..b9074ac 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ $ git clone https://git.phc.dm.unipi.it/phc/website ## Development +### Setup + Copiare il file `.env.dev` in `.env` per dire al server di lavorare in modalità di development e su quale indirizzo servire il sito, poi avviare il server. ```bash shell @@ -19,14 +21,26 @@ $ cp .env.dev .env $ go run . ``` +### Server + Un comando comodo in fase di development che usa [`entr`](https://github.com/eradman/entr) è ```bash shell $ find . -type f -name '*.go' | entr -r go run . -# Or also... +# O anche con fd... $ fd -e go | entr -r go run . ``` +### Frontend + +Se si sta anche modificando codice dentro `frontend/`, in contemporanea serve anche fare + +```bash shell +$ make js +# O anche con un watcher... +$ fd -e js | entr make js +``` + ### Environment Variables - `MODE`