Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.45 KB

README.md

File metadata and controls

38 lines (29 loc) · 1.45 KB

Build Status

Get started

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:

  1. 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"

  2. Run command tsc to compile typescript files to js.

Available Scripts

In the project directory, you can run:

npm start

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"}

npm test

Run jest --coverage command to test all the test files.

Build docker image

Start docker-compose