The server project has two servers, UDP server and HTTP Server. UDP server will listen udp messages and forward it http server using Azure Eventhub
Before you can run the scripts, please do the following:
- Create an .env file in src folder contains following data
EVENTHUB_CONNECTION_STRING="connection string to event hub"
EVENTHUB_NAME="even hub name"
STORAGE_CONNECTION_STRING="connection string to storage account"
STORAGE_CONTAINER_NAME_EVENTHUB="storage container name to log event hub processing information" - Run command tsc to compile typescript files to js.
In the project directory, you can run:
Runs the two servers in the development mode.
-
UDP Server is on port 20500
Send ASCII text to 127.0.0.1:20500
Example:"test"
-
Express Api Server is on port 5000
Post JSON data to http://localhost:5000/receive
Example:{"body": "test"}
Run jest --coverage command to test all the test files.