Demo: https://mapa.falanster.by/
Are you're interested in contributing to KVM? The following is a description of a quickstart. If you're looking for a more comprehensive introduction, have a look at CONTRIBUTING.md.
To be able to start development you'll need the following tools:
Now clone this repository:
git clone https://github.com/diglabby/mapa.git
Go to the root of it and install all the dependencies:
cd mapa/
yarn install
or
npm install
The easiest way to get a local setup running is by using the remote API of OpenFairDB.
To do so change src/constants/URLs.js
to
https://github.com/goodmap/goodmap-old/blob/e9658f1d2a8d77effe4cfabc085b5c7a2c65c3f3/src/constants/URLs.js#L64
OFDB_API: {
//link: window.location.origin + "/api" //use when you run openfairdb locally
link: window.location.protocol + "//" + "api.ofdb.io/v0" //use this to use the remote api
// link: window.location.protocol + "//" + "dev.ofdb.io/v0" //if you want to work with development environment
}
The alternative is to run OpenFairDB Server locally:
wget https://github.com/slowtec/openfairdb/releases/download/v0.5.5/openfairdb_v0.5.5.x86_64-unknown-linux-musl.tar.xz
tar xzf openfairdb_v0.5.5.x86_64-unknown-linux-musl.tar.xz
./openfairdb
To actually get started you also need to add some content. (Save database, copy it to openfairdb directory, unzip and override the previous database).
Change this file webpack.config.babel.js
according to this commit. And src/constants/URLs.js
according to this commit
Launch OpenfairDB
RUST_LOG=info ROCKET_PORT=6767 DATABASE_URL=openfair.db ./openfairdb
from /path/to/openfairdb/ directory.
openfairdb
should now be listening on port 6767.
If both openfairdb
and mapa
app are running, but no entries are displayed in mapa
and you have an ECONNREFUSED
error in console, then you should do the following:
webpack.config.babel.js
.target: "http://[::1]:6767",
mapa
app.openfairdb
folder: cd ./openfairdb
openfairdb
should now be listening on port 6767. cd /path/to/mapa/
yarn start
or
npm start
The web app is now listening on port 8080.
Open it in your browser https://localhost:8080
.
On every file change in src/
, the app will be build
for you and the browser reloads automatically.
All the tests can be found in the spec/
folder.
To run the tests type
npm t
KVM uses the OpenFairDB as its backend.
Copyright (c) 2015 - 2018 Markus Kohlhase mail@markus-kohlhase.de This project is licensed under the AGPLv3 license.