You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.8 KiB

ttn-ogcswe-integration developer guide

This project is written for node.js 6.x in TypeScript, which needs to be compiled to javascript before running. The source is managed using git flow, where features are developed on feature branches and then pulled into the develop branch.

dev env setup

  1. Install the following dependencies:
  • node.js 6.x or later: javascript runtime
  • yarn: package manger & launcher
  • git: source control
  1. Follow the instructions under Native Installation in README.md.

  2. Register an application in TheThingsNetwork, and create a key for it. Insert the Application ID and the key into config.yml.

  3. Set up an development instance of the storage backend you want to develop against. For the 52N SOS a docker image is defined in docker/sos. Enter its address at broker.options.host in config.yml.

build cycle

  1. create a feature branch: git checkout develop && git checkout -b feature/myfeature
  2. launch your storage backend and make sure config.yml correctly points to it
  3. run yarn build:watch to start the build process on each source change.
  4. Make changes in src/**.
  5. (re)start the application with yarn start and test.
    • to do end to end tests without a LoRa device, you can simulate TTN uplink messages at the device view in console.thethingsnetwork.org or using ttnctl.
  6. repeat from step 4 until a (sub)feature is working/fixed.
  7. lint the code using yarn lint and fix errors as suggested.
  8. commit using git commit
  9. create a pull request on github to develop.

Please make sure your code fits the style of the existing codebase, and verify with yarn lint before committing.