OpenMapKit Server is a NodeJS service, so you'll need NodeJS version 4.x.
Ubuntu & Debian
sudo apt-get install default-jre-headless sudo apt-get install build-essential python-pip git curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install nodejs
The ODK pyxform component requires python dependencies that are installed via pip. The best way to install pip on a Mac is through Homebrew:
brew install python
Make sure you have installed Java.
pyxform has a Java dependency (JavaRosa). Full instructions on Stack Overflow.
brew cask install java
Install project dependencies.
git submodule init git submodule update sudo pip install -r requirements.txt npm install
Turn on server
npm start is failing, run
npm start --verbose to see detailed log execution.
You might encounter
Error: Could not locate the bindings file. Run
npm install libxmljs to fix this.
By default the authentication is enabled in OpenMapKitServer. You can disable it,
by setting the environment variable
1 or as
Run on development mode
To start the server in the development mode, use
npm startdev, it will make the React App restart each time the frontend code is updated.
Updating frontend builds
The frontend builds are ignored by the
master branch git and available on the
dist branch. To make a new build and push it to the
dist branch, use
If you want to enable AWS S3 sync, in a way to have a backup of forms and submissions files in a S3 bucket, set the following environment variables:
export ENABLES3SYNC=1 export AWSKEYID=<your AWS access key ID> export AWSSECRETKEY=<your AWS secret access key> export AWSBUCKETNAME=<a S3 bucket name> export AWSBUCKETPREFIX=<(optional, bucket root is the default prefix) subdirectory where the files should be stored in the S3 bucket>
This will make the data be syncronized to your S3 bucket after each API request that modifies the data. The first variable enables/disables the S3 sync and need to receive the value 1 or 0.
If you need to get the data stored in a S3 Bucket to put it in your server,
To assure that the files were synced to AWS before turning off a server, execute
NodeJS Version Problems
We are using node version 4.*. If you are having problems with another version, use node version manager.
nvm install nvm use