Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1090859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:26:06+00:00 2026-05-16T23:26:06+00:00

Is there a web server library for F#, similar to SimpleHTTPServer in Python? Installing

  • 0

Is there a web server library for F#, similar to SimpleHTTPServer in Python?

Installing a full server like IIS is overkill for what I want, which is a simple application that can be queried using a web browser, effectively using HTTP as a monitoring method. Ideally, a request to the address /engines/id/state would map to a function get_state(engine_id) which I provide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:26:07+00:00Added an answer on May 16, 2026 at 11:26 pm

    A self-hosted WCF service is not a bad start; here’s a tiny one for starters:

    open System
    open System.IO 
    // add reference to these two guys, need .NET full (not client profile)
    open System.ServiceModel
    open System.ServiceModel.Web
    
    [<ServiceContract>]
    type MyContract() =
        [<OperationContract>]
        [<WebGet(UriTemplate="{s}/{t}")>]
        member this.Get(s:string, t:string) : Stream =
            let html = sprintf @"
    <!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">
    <html><head></head><body>Called with '%s' and '%s'</body></html>" s t
            upcast new MemoryStream(System.Text.Encoding.UTF8.GetBytes(html))
    
    let Main() =
        let address = "http://localhost:64385/"
        let host = new WebServiceHost(typeof<MyContract>, new Uri(address))
        host.AddServiceEndpoint(typeof<MyContract>, new WebHttpBinding(), "") 
            |> ignore
        host.Open()
        printfn "Server running at %s" address
        printfn "Press a key to close server"
        System.Console.ReadKey() |> ignore
        host.Close()
    
    Main()
    // now go hit 
    // http://localhost:64385/foo/42
    // in your browser
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any php script to find the name of the web server like
I'm trying to write a simple python web application using the Tornado web server
Is there a oBix client library toolkit for Delphi? oBix is a XML web-server/client
Is there a way, at the web server level (web.xml) to set headers for
There is staging server with multiple .NET web applications deployed. Is there any way
Is there any open source web client php application without popup server configuration ,
We're using a Ruby web-app with Redis server for caching. Is there a point
Newbie question: There are three types of Asp.Net controls : HTML server controls, Web
I built a .NET ASMX web service connecting to an SQL Server database. There
Is there anyone knows about list of web servers which is used in embedded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.