A client (single page web application) that shall demonstrate typical FAIR DO use cases.
About more documentation about how this application communicates with other services, refer to the documentation of the testbed4inf.
A docker container is available as part of the testbed4inf. Manual instructions:
-
Install
Rust
andwasm-pack
- Follow the instructions at https://www.rust-lang.org/tools/install to install the rust toolchain.
- Follow the
installation
link atthe wasm-pack website
to install wasm-pack.wasm-pack
will help to compile and bundle the rust code, html and css together to a ready-to-host single page web app.
-
Build
- Run
bash build.sh
. The result is a ready-to-host application which will be stored in thestatic
folder. - If you want to compile faster, you can use
bash build.sh --dev
. Note that the file size of the application will be larger, resulting in potential slower application and longer initial loading time.
- Run
-
Run
- All you need is to serve the folder
static
with any webserver. To run it locally, you may use i.e. simple-http-server.- Install simple-http-server:
cargo install simple-http-server
- Use:
bash serve.sh
or customize the command in the serve script.
- Install simple-http-server:
- In case you use another http server, please look at the production usage section below.
- All you need is to serve the folder
In case you prefer the python3 http server:
- `python3 -m http.server 8080`
Now, access http://localhost:8080/ in a browser to run the app.
This application is supposed as a demonstration. But in case you want to use another webserver i.e. for having an easily accessible instance:
- [Neccessary] Make sure your webserver is configured to associate WebAssembly files (.wasm) with the MIME type
application/wasm
. - [Recommended] Configure your webserver to point every sub-url of the application to the index.html, in case the target is not found. This option is sometimes called "try file" (see
serve.sh
file).- In case this is not configured properly, reloading a page that does not point to the index.html direcly will not work properly. This is not a problem in most cases, just do not reload your page to avoid problems.
As this application is part of the testbed4inf, there is a dockerfile available. You may use this, but currently it is not configured properly for step 2. This will change in the future.