Name: Test-Assets-Dataset-Public
Owner: Dash Industry Forum
Description: null
Created: 2017-10-19 09:26:51.0
Updated: 2017-10-19 11:54:26.0
Pushed: 2017-11-28 16:16:21.0
Homepage: null
Size: 125
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The DASH-IF Testvector database is a tool to allow a dynamic management of the testvectors provided by the DASH Industry Forum. This includes:
A live demo of the tool can be found here. This repository provides the server-side functionality of the tool. It is supposed to run alongside the Test-Assets-UI.
The backend system consists of two parts
MongoDB >= 3.2.x is required.
Follow instruction on how to Install MongoDB Community Edition on Ubuntu.
We recommend free and open source native and cross-platform MongoDB manager
Our current system is installed on Ubuntu Server 14.04 LTS (HVM)
Follow instruction on how to install NodeJS v4.x
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
Then we set up a package root in homedir to hold the NodeJS “global” packages:
homedir
for NodeJS “global” pacakges$ NPM_PACKAGES="$HOME/.npm-packages"
$ mkdir -p "$NPM_PACKAGES"
Set NPM to use this directory for its global package installs:
$ echo "prefix = $NPM_PACKAGES" >> ~/.npmrc
Configure your PATH and MANPATH to see commands in your $NPM_PACKAGES prefix by adding the following to your .zshrc/.bashrc:
# NPM packages in homedir
NPM_PACKAGES="$HOME/.npm-packages"
# Tell our environment about user-installed node tools
PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath` command
unset MANPATH # delete if you already modified MANPATH elsewhere in your configuration
MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
# Tell Node about these packages
NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
You can add your server SSH Key to git for authentication by following adding a new SSH key to your GitHub account instruction.
Choose your own method how to obtain source code. In our example we cloning using HTTPs method
$ git clone https://github.com/Dash-Industry-Forum/Test-Assets-Dataset-Public.git
$ cd Test-Assets-Dataset
$ npm install
You could also download ZIP Archive https://github.com/Dash-Industry-Forum/Test-Assets-Dataset/archive/master.zip
$ unzip master.zip
$ cd Test-Assets-Dataset-master
$ npm install
The config
directory contains config files for different NODE_ENV
settings. By default the values from the default.json
are used.
In order to setup the database parameters change the values in dbConfig
. Please follow the instructions on the MongoDB documentation to create the respective users for your database.
Also keep in mind to start the MongoDB with authorization turned on:
mongod --auth
Find in npm module mongodb ..node_modules\mongodb\node_modules\bson\ext\index.js
and change path to js version in catch block
bson = require('../build/Release/bson');
to
bson = require('../browser_build/bson');
Install the dependencies
npm install
If this is a new setup you need to add a superuser.
cd datasets
node create_user.js
Afterwards you can run the API Server by typing:
npm start
In order to change the port adjust the webConfig.port
parameter in your config file.
Now you can login with the superuser and add additional users if necessary.