An example of a web service written in asp.net core using Giraffe and F#
Project files
RadioDeviceService/
Models.fs : DTOs and internal model representations
RadioRepository.fs : simple in-memory repository for getting/setting radio profiles and locations
HttpHandlers.fs : for handling incoming requests
Program.fs : handling routes and configuring application
RadioDeviceService.Tests/
Tests.fs : endpoint tests
TestUtils.fs : utilities for tests
Open a Terminal and go to the RadioDeviceService/src/RadioDeviceService
folder. To run on localhost:8000
(port 8000):
docker build -t radio-device-ws:latest .
docker run --publish 8000:5000 --rm radio-device-ws
Go to the root directory RadioDeviceService/
. To run:
docker build -t radio-device-ws-tests:latest .
Go to the root directory RadioDeviceService/
and build:
build.bat
To run the web service on localhost:5000
(port 5000):
dotnet run --project src/RadioDeviceService/