Commit f575a299 authored by Exbrayat Cédric's avatar Exbrayat Cédric
Browse files

docs: update readme

parent db7b83ee
......@@ -9,7 +9,7 @@ Look at the [contribution guide](CONTRIBUTING.md).
## Install development environment
- Install `node` and `npm`
- Install `node` and `yarn`
Installation via `nvm` is recommended for easier control of installed version:
https://github.com/creationix/nvm
......@@ -19,24 +19,18 @@ nvm install 10.13.0
nvm use v10.13.0
```
- Install Angular CLI
```sh
npm install -g @angular/cli@7.0.6
```
- Install JS dependencies
```sh
cd frontend
npm install
cd web
yarn
```
- Install latest Java JDK8
See latest instructions for your operating system.
- (Optional) Install `docker` and `docker-compose`
- (Optional) Install `docker`
If you want to run an Elasticsearch and Kibana instance on your machine.
You can use your favorite package manager for that
......@@ -49,7 +43,7 @@ First make sure you have access to an Elasticsearch HTTP API server on `http://1
If you want to run an Elasticsearch server on your development machine you can use the `docker`/`docker-compose` configuration like so:
```sh
docker-compose up
docker compose up
```
> This will launch an Elasticsearch server (with port forwarding `9200`) and a Kibana server (with port forwarding `5601`)
......@@ -57,13 +51,20 @@ docker-compose up
> **Warning**: This repository does not automatically index data into Elasticsearch, you need to prepare your indices beforehand.
If you just need access to API (to run the `ng serve` on top of it), you can run:
If you just need access to API, you can run:
```sh
./gradlew bootRun
```
Otherwise, for the complete server (backend APIs + frontend interface), you can run:
If you are developing and need to work on the `web` assets (scripts, styles, etc),
you'll need to run the application with the `dev` profile:
```sh
./gradlew bootRun --args='--spring.profiles.active=dev'
```
Otherwise, for the complete server (backend APIs + web interface), you can run:
```sh
./gradlew assemble && java -jar backend/build/libs/faidare.jar
......@@ -71,18 +72,26 @@ Otherwise, for the complete server (backend APIs + frontend interface), you can
The server should then be accessible at http://localhost:8380/faidare-dev
## Run frontend development server
## Build the JS/CSS assets for the Web module
The frontend requests are redirected to the local backend API server (see instructions above to launch) via the
Angular proxy.
The `web` directory contains the scripts and styles used by the thymeleaf templates
when a Germplasm, Study or Site page is rendered.
You can run the development server with the following command:
The build process for these assets can be run with the following command:
```sh
cd frontend
ng serve
cd web
yarn watch
```
`yarn watch` automatically picks up the changes in any files,
and rebuild the resulting assets (thanks to Webpack).
Make sure the backend is running with the `dev` profile if you do so (see above),
otherwise the changes won't be shown in the browser.
`yarn watch:prod` is also available to use production settings,
while `yarn build` and `yarn build:prod` do the same but without watching the changes.
## Harvest
Before all, take care to get data locally before running any indexing script.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment