A project to play around with JavaScript and F# using Suave. Will feature various common design patterns and libraries, and shows how you can host js, css and html files using Suave.
- Suave
- websockets
- using a "let's encrypt" sll certificate and automatically updating it
- js DOM selectors (no jQuery)
- by id
- by tag
- by class
- first in a specified query
- all in a specified query
- AJAX calls without jQuery
- using Suave to host client resource files
- dynamically create a script block and serve it through a route as a file
- combining AJAX calls with Suave routing
- get
- client-side call
- server-side route
- post
- client-side call
- server-side route
- get
- responsive css
- JSON models
- mongodb
- Promises
- create
- use
- F# fold
- js map
- js reduce
- error handling
- logging
- minify and concatenate client scripts and style sheets
- add web app manifest
- add a favicon.ico
- manipulate browser history
- add a service worker (for offline caching)
You'll need to install dotnet Core 2.0 first. Afterwards you can run the following commands in your shell to get and run the code:
$ git clone https://github.com/SubliemeSiem/fsharp-playground.git
$ cd fsharp-playground
$ dotnet restore
$ dotnet run
To visit the page, browse to http://localhost:4000. To see the mobile or tablet version, browse to http://[ip]:4000, where [ip] is the ip address of the system running Node.js, using a phone or tablet that is connected to the same network. To get ssl to work using let's encrypt, you'll need some sort of static address. This may be an address provided by a DDNS service, or a static ip address. Details about the configuration for let's encrypt can be found in (not implemented yet).