forked from phc/website
Aggiunto come impostare l'ambiente di development per il js
This commit is contained in:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user