-
Notifications
You must be signed in to change notification settings - Fork 12
Training ‐ Setting Up Development Environment
- v1.4: requires Java 8
- v2.0: requires Java 11
- https://www.openlogic.com/openjdk-downloads
APIs supported:
- v1.4 Sensor Web Enablement
- v2.0 Sensor Web Enablement, Sensor Web API, and SensorThings API
- Choose version to develop against
- Clone respective branch from GitHub repository
- v1.4:
git clone https://github.com/opensensorhub/osh-node-dev-template.git --recursive
- v2.0:
git clone --branch v2-upgrade https://github.com/opensensorhub/osh-node-dev-template.git --recursive
- Performing the initial build ensures the development environment is set up correctly. Make sure you have the right JDK version for the OSH SDK version you are working on, for example:
java -version
May print:
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) Client VM (build 25.231-b11, mixed mode, sharing)
- Execute build command (excluding unit tests, ‘-x’)
cd osh-node-template
./gradlew build -x test
- A successful build will generate the build subdirectory
- The build will contain subdir distributions
- The zip file is the build target
- Unzip the build target
unzip osh-node-dev-template\build\distributions\osh-node-0.0.1.zip
- Execute the launch script for your corresponding OS
- Windows
./launch.bat
- Linux (ensure permissions are correct: chmod +x launch.sh)
./launch.sh
Connecting to a node requires the operator to know either the IP address or Uniform Resource Locator (URL) for the server hosting the particular node port. To connect to an OpenSensorHub node, enter the following in the Web Browser’s address bar:
http://[IP_ADDRESS]:[PORT]/sensorhub/admin The default port is 8181 but may be changed through the admin panel (see Network for configuration) Note that if the node is being served through https, the default port will be different (likely, 443) but does not need to be specified, for example: https://[IP_ADDRESS]/sensorhub/admin
Open a web browser and navigate to:
- Default username: admin
- Default password: admin