This repository has been archived and is no longer actively maintained.
The latest version of the project can now be found at netwerk-digitaal-erfgoed/sabio-frontend.
This repository contains the user interface for The SociAl BIas Observatory (SABIO).
To use this application, you need a SABIO API, like valevo/SABIO.
A demo can be found at: https://sabio.sudox.nl/
Install the dependencies, by running:
yarn install
Copy .env.dist
to .env.development.local
and set the values to match your (API) configuration.
Start the application in development mode, by running:
yarn start
Open http://localhost:3000 in your browser.
Copy .env.dist
to .env.production.local
and set the values to match your configuration.
Build the application, using yarn:
yarn build
The compiled version and static files can be found in the build
folder.
The files in the build folder can be hosted as static files on your webserver.
In order for react-router
to handle the routing, the web server must be configured to redirect unresolved requests to index.html
.
Include the following lines in your Nginx configuration file
# Any route containing a file extension (e.g. /script.js)
location ~ ^.+\..+$ {
try_files $uri =404;
}
# Any route that doesn't have a file extension (e.g. /browser)
location / {
try_files $uri $uri/ /index.html;
}
# Rewrite urls to index.html for React router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
Make sure mod_rewrite
is enabled.
Run yarn run docker
to build and run the container.
Docker can be used to run this application without requiring the installation of dependencies on your system.
The Dockerfile contains two steps:
- Build the application
- Host the resulting files using Nginx on port
8080
Make sure to configure the environment correctly by file .env.production.local
, or by providing the environment variables in your build command.
See LICENSE.txt
- Design & Development: SUDOX
- Project: The SociAl BIas Observatory (SABIO), 2021
- Client: Royal Netherlands Academy of Arts and Sciences (KNAW)
- Funded by: Dutch Digital Heritage Network