Questions tagged [suave]

A lightweight, non-blocking web server for F#

Suave is a lightweight, non-blocking web server. The non-blocking I/O model is efficient and suitable for building fast, scalable network applications. In fact, Suave is written in a completely non-blocking fashion throughout. Suave runs on Linux, OS X and Windows flawlessly.

112 questions
2
votes
1 answer

How do I tell Suave not to cache a url?

I have 2 paths getting cached Auth.loggedOn ( GET >=> pathScan "/era/%i" (Some >> EraViewing.eraView homeFolder cn) path "/" >=> indexView homeFolder cn There is a x.html file behind each of these which get served after…
Maslow
  • 18,464
  • 20
  • 106
  • 193
2
votes
1 answer

Mutable application context

I'm building a REST backend that requires a large collection of values to compute the answers. This collection is downloaded at boot time and then on demand but needs to be updated a few times per day. I can't figure out how to cope with this…
team-rf
  • 241
  • 1
  • 7
2
votes
1 answer

How to handle multiple forms on a single page using Suave.Experimental

I have to create simple page with multiple form. I decide to use Suave.Experimental for this purpose. When I click on submit button on the second form, I get the following error Missing form field 'Second' WebPart let webpart = choose [ …
Ev_Hyper
  • 183
  • 8
2
votes
1 answer

Suave and DotLiquid

edited for clarity somehow this works: path "/" >=> warbler (fun _ -> OK (string DateTime.Now)) but this one does not: let txnAccA = let sqlStr = "select JSON from Store.Txn" let result = Db.execute sqlStr Config.oConnStr match result…
himekami
  • 1,419
  • 3
  • 13
  • 21
2
votes
0 answers

How to deploy a Suave.IO project with Heroku

This is my first time using heroku and I'm having some troubles deploying my small Suave web app. After reviewing the docs here, I understand that I need to set up a Procfile so that heroku knows how to run my application. Here's a picture of my…
Nathan Ortega
  • 538
  • 1
  • 5
  • 17
2
votes
0 answers

Files piling up in Suave.io's _temporary_compressed_files folder

I'm using Suave.io as a web server in a shared hosting environment. I've noticed that files created in the _temporary_compressed_files folder are never getting deleted. The documentation says "Suave deletes these files once they are served, so their…
Brian Berns
  • 15,499
  • 2
  • 30
  • 40
2
votes
0 answers

Custom error handling with asp.net core and suave in F#

This question is to validate the custom error handling implementation here or is there a better workaround possible? Is there any other best possible way that you could suggest? I am using Suave with Asp.Net core and kestrel server in F# to build…
2
votes
1 answer

Suave SQl Provider DatabaseProvider has already been given a value

I am currently going through the Suave Music store tutorial and have come to the database portion, where they instruct you to build a SQL connection like this: type Sql = SqlDataProvider< "Server…
2
votes
1 answer

Nesting Suave WebPart

I've been playing around Suave for the very first time and clearly there's something I don't understand. What I'm trying to achieve is to implement a simple Rest API: user can get information about financial instruments moreover, every instrument…
LA.27
  • 1,888
  • 19
  • 35
2
votes
2 answers

Using of non latin characters in the Suave

I want to use non latin symbols in the Suave, for example, cyrillic, but getting the weird result MCVE open Suave open Suave.Filters open Suave.Operators open Suave.Successful let app = choose [ GET >=> OK "Привет, Мир!" …
FoggyFinder
  • 2,230
  • 2
  • 20
  • 34
2
votes
1 answer

How to handle pathScan decoding of url encoded parameters?

I have something like :- pathScan "/blah/%s" (fun x) -> (sprintf "%A" x) |> json) and what it shows me if I do /blah/AT%2BVER%3F is the url encoded data. Is there a way to get this decoded automatically? or do I need to parse all my…
Keith Nicholas
  • 43,549
  • 15
  • 93
  • 156
2
votes
1 answer

How to run a Suave Application in the background?

It seems that doing mono AppName.exe & is not working. Do I need to change the default configuration of the suave app ir something else? Do I need to use the async version of startWebServer?
Lay González
  • 2,901
  • 21
  • 41
2
votes
1 answer

FTP'ing a Suave app to Azure

Having never used Azure before I'm attempting to deploy a simple F# Suave app to Azure using FTP. Ultimately I want to deploy via github but I initially thought FTP'ing it would be the easy first step. According to…
Simon Lomax
  • 8,714
  • 8
  • 42
  • 75
2
votes
1 answer

WebServer JSON Response change key names for Object

I'm implementing a react/redux app where I'm calling an API to fetch some data. The API is written in F# and uses Suave.io. In my back end, for some API calls, I return a DataSet (.NET Type). It includes many DataTables that have multiple columns.…
Kafo
  • 3,568
  • 1
  • 12
  • 19
2
votes
1 answer

creating a simple TCP server in F# and Suave.IO

Is it possible, using Suave.IO and F#, to create a simple one-line TCP server along the lines of the http server below? startWebServer defaultConfig (Successful.OK "Hello World!") (the TCP server could do something simple like reply with the string…
Ian Spratt
  • 261
  • 2
  • 5