React app to display data provided by an API in fdbk statistics format. See fdbk/examples/net_status
for an example.
To get development server running on your machine, run:
# Install dependencies and start dev server
npm install
npm start
The code is linted and unit tested with:
# Lint
npm run lint
# or
npm run lint -- --fix
# to also fix automatically fixable errors
# Unit test
npm test
# or
npm test -- --coverage
# to also get coverage analysis
To create production build:
# Build
npm run build
# Build with non-root public URL
echo 'PUBLIC_URL="/${path}/#/"' > .env
npm run build -- --public-url /${path}/
The fdbk interfaces are defined by JSONSchema documents in fdbk repository and converted to TypeScript definitions with json-schema-to-typescript. For example to create statistics types, cd into fdbk repository root and run:
json2ts fdbk/schemas/statistics-out.json > Statistics.ts
json2ts fdbk/schemas/topic.json > Topic.ts
Replace the file in src/Types with produced file.