Client application for the FAIR Data Point providing an HTML-based user interface for browsing the metadata and administration.
Documentation explains how to install, configure and use the FAIR Data Point.
Install dependencies using:
$ npm install
- Start the FDP server (default
http://localhost:8080). - Create
public/config.jsand setapiURLto the FDP server:
// public/config.js
window.config = {
apiURL: 'http://localhost:8080',
}- Run the dev server:
$ npm run serve
The client will be available at http://localhost:8081.
Tip: If you run both, the server and the client locally, start the server first, because it needs to run on port 8080. The client will then be automatically started on port 8081.
Compile and hot-reload for development:
$ npm run serve
Compile and minify for production:
$ npm run build
The nginx container can be configured at runtime using environment variables:
API_URL(optional): absolute URL the browser should call for the API (recommended for Docker).FDP_HOST(optional): backend host:port used by nginx proxy inside the container network.FDP_SCHEME(optional):httporhttpsfor the proxy (httpdefault).PUBLIC_PATH(optional): base path if serving under a subpath (e.g./app).REBUILD_STYLES(optional): set to any value to force rebuilding SCSS at container start.
Example: backend is another container on the same network (fdp service):
docker run --rm -p 8081:80 \
--network fdppv1_default \
-e FDP_HOST=fdp:8080 \
-e FDP_SCHEME=http \
-e API_URL=http://localhost:8081 \
fdp-client
Example: backend is on host machine:
docker run --rm -p 8081:80 \
-e FDP_HOST=host.docker.internal:8080 \
-e FDP_SCHEME=http \
-e API_URL=http://localhost:8081 \
fdp-client
If the backend is HTTPS-only, set FDP_SCHEME=https and ensure the API URL is https://....
Run tests or linter:
$ npm run test
$ npm run lint
This project is licensed under the MIT License - see the LICENSE file for more details.