Skip to content

An example of a web service written in asp.net core using Giraffe and F#

Notifications You must be signed in to change notification settings

nikolasborrel/web-service-in-f-sharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

A web service in F#

An example of a web service written in asp.net core using Giraffe and F#

Overview

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

Running

Docker: run the web service

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

Docker: Tests

Go to the root directory RadioDeviceService/. To run:

docker build -t radio-device-ws-tests:latest .

Local machine (non-Docker)

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/

About

An example of a web service written in asp.net core using Giraffe and F#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages