Code Monkey home page Code Monkey logo

knaw-sabio's Introduction

๐Ÿ‘‰ Repository Archived and Relocated

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.


SABIO UI

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/

SABIO UI screenshot

Prerequisites

Installation

Install the dependencies, by running:

yarn install

Development

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.

Production

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.

Hosting

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.

Nginx

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;
}

Apache

# 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.

Docker

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:

  1. Build the application
  2. 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.

License

See LICENSE.txt

About

knaw-sabio's People

Contributors

whelmich avatar

Watchers

 avatar

knaw-sabio's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.