WebThing to perform an addition of two numbers
!A preview image of the WebThing Add in the Webthings Gateway
A + B = YY is the sum of the modifiable properties A and B.
Property | Internal name | Type | Modifiable? | Description
---|---|---|---|---
A | a | number | yes | First summand
B | b | number | yes | Second summand
Y | y | number | no | The sum of A and B
``Download the repository via git
git clone https://gitlab.com/webthings/webthing-add.git
Run
`
Specify a port in Bash (Linux and Mac)
#export PORT=8000
Specify a port in Batch (Windows)
#SET /A PORT=8000npm start
`This starts a web server on your machine. By default it starts on TCP port 8000. Determine your system’s local IP address and add the WebThing to your gateway.
$3
#### It fails to start with Error: listen EADDRINUSE :::8000
You already have an instance of this project or another application running on the mentioned TCP port. On a computer a port cannot be assigned to two servers.
On Linux you can identify open TCP ports and the owner process with the command netstat -lnpt.#### The server is not reachable from another computer
Ensure that the computers are on the same network. Test their connectivity with the
ping` command. If they are connected, the computer running the server might block the TCP port with its firewall.