/MyASPCoreFSharpServer

Simple Restful API Server, written with F# and ASP.NET Core 2

Primary LanguageF#

MyASPCoreFSharpServer

Simple Restful API Server, written with F# and ASP.NET Core 2

The project was originally created by:

dotnet new webapi -lang F# -o ApiServer

Some notable modification:

  • Support CORS (most tolerant!).
  • Disable HTTPS Redirection.
  • Return Response with Status Code (Plain Text, JSON).

Run:

dotnet build
dotnet run
Now listening on: https://localhost:5001
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.

Test:

Use Fiddler:

GET http://localhost:5000/api/values/9
Accept: application/json; text/plain

Debug:

  • In Visual Studio Code, click "Start Debugging" in Debug Tab. NB: No browser is automatically loaded!

Enjoy!

Also, if Java/JRE is prefered, see [1].

Software Environment:

Reference:

[1] https://github.com/ThachNgocTran/MyJettyJerseyServer