Aggiunto come impostare l'ambiente di development per il js

main-old
Antonio De Lucreziis 2 years ago
parent 58db3e3901
commit e6c46d75dc

@ -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`

Loading…
Cancel
Save