https://github.com/simonhdickson/bar
Prototype of an FSharp Nano-framework based on Sinatra
https://github.com/simonhdickson/bar
Last synced: 25 days ago
JSON representation
Prototype of an FSharp Nano-framework based on Sinatra
- Host: GitHub
- URL: https://github.com/simonhdickson/bar
- Owner: simonhdickson
- Created: 2013-09-18T15:25:00.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-22T22:29:45.000Z (over 12 years ago)
- Last Synced: 2023-04-19T10:27:34.140Z (about 3 years ago)
- Language: F#
- Size: 129 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Bar
===
Prototype of an FSharp Nano-framework based on Sinatra
It only has 2 dependancies (Owin, and Newtonsoft.Json), and Newtonsoft.Json is only used for deserializing query string members
Hello World looks like this:
type MyApp() =
member x.``GET /`` () =
"Hello World"
Does support different verbs but there is no way to actually get posted data (it is only a prototype):
type MyApp() =
member x.``POST /`` () =
"Thanks!"
Types parameters from the query string too:
type MyApp() =
member x.``GET /square`` number =
number * number
By default does no content negotiation whatesoever, although there is a dumb component that can be used to just return plain text.