- NPM >= 5
- Node >= 8
Run npm i
Run npm start
This will start a web server on https://localhost:8080. Accept the untrusted certificate, well, because it's unsigned and for localhost.
We default the backend to go towards https://api.lora.telenor.io
, but when developing this might not be preferrable as you might have your own congress running. Ex: To set the backend to http://localhost:8080 and websocket server to ws://localhost:9090
npm start -- --env.congressEndpoint=http://localhost:8080 --env.congressWsEndpoint=ws://localhost:9090
The environment variables who can be configured through the CLI is the following
- myConnectUrl: string
- congressEndpoint: string
- congressWsEndpoint: string
- production: boolean
Tokens and other keys are found under config/config.json
. The credentials are restricted so change these if you plan to deploy your own congress.
Run all tests
npm t
Running this command will run all the tests below
npm run test:jest
This will run tests found in the project and create a coverage report in test/coverage-jest
which can be opened locally in your favorite browser.
npm run test:build
This will test the bundlesize as well as e2e of the production built app.
npm run test:lint
Will run all linting below
npm run test:eslint
npm run test:tslint
npm run test:retire
Run npm run build
This will build an optimized build for production purposes and output to the dist
folder.
To deploy run
npm run deploy:{yourFavoriteEnvironment}
This will trigger a full test of the project along with the corresponding deploy script. You'll need the correct credentials to be able to use the scripts. The scripts uploads to an AWS S3-bucket and refreshes the AWS CloudFront distribution upon successful upload.