bit4sat/web
2019-04-09 09:20:46 +02:00
..
src admin token view 2019-04-09 09:20:46 +02:00
.babelrc all src in same repo 2019-03-23 18:01:49 +01:00
.eslintrc.js all src in same repo 2019-03-23 18:01:49 +01:00
.nvmrc all src in same repo 2019-03-23 18:01:49 +01:00
bit4sat_dev_dist.tar admin token view 2019-04-09 09:20:46 +02:00
Caddyfile admin token view 2019-04-09 09:20:46 +02:00
Caddyfile-prod update caddyfile 2019-04-07 14:20:35 +02:00
desktop-home.pdf all src in same repo 2019-03-23 18:01:49 +01:00
home-page.odg all src in same repo 2019-03-23 18:01:49 +01:00
index.html home and uplaod view with pay management/wip admin token 2019-04-04 20:26:43 +02:00
package.json db refactoring + wip dl id 2019-04-05 18:18:44 +02:00
README.md all src in same repo 2019-03-23 18:01:49 +01:00
yarn.lock home and uplaod view with pay management/wip admin token 2019-04-04 20:26:43 +02:00

bit4sat

Installation

  • init/install the right node version in .nvmrc
nvm install $(cat .nvmrc)
nvm use
  • install yarn (optional)

sudo apt update && sudo apt install -y yarn

  • install deps

yarn

or with npm

npm install

start dev server

With yarn:

yarn run start

or with npm

npm start

Backend Server

Run:

> git submodule init
> git submodule update

The go server will be find in the server folder. To Run it use:

> cd server
> make
> ./bit4sat

API

These are the currently available API endpoints:

  • POST on /upload: Accept a form with content type application/json with following structure:
{
    "files": {
        "name": "this is the name/path of file (required)",
        "size": "size of file (not required)",
        "sha256": "sha256 (not required)"
    },
    "timestamp": "timestamp as in Date().toJSON() in js"
}

Example API call:

curl -sX POST  \                                                                                                                                                     Fri 19:10
  --header 'content-type: application/json'  'localhost:8880/upload/' \
  --data '{"files":[], "timestamp": "2012-04-23T18:25:43.511Z" }'