This repository contains simple WebSharper projects, written in F#, prepared to run on Linux with Mono.
Interested to know about the applicability of WebSharper for real projects and coming from the Linux world (I never used .NET before), I tried to run some experiments but I got frustrated with the available tools and documentation for just "getting started" (look at this question).
In summary, the main motivation for this repository is to help people to get started with F# and WebSharper.
Supposing you are running on a Debian/Ubuntu environment:
mono-devel
mono-runtime
fsharp
To run this project, you don't need to use any specific editor, but VS Code integrates well with F# (no surprises) and has some useful plugins (like Vim keybindings and Ionide).
vim-sharp seems full of features too, but I found it too heavy for a common Vim experience.
-
Fetch
paket.exe
by runningmono .paket/paket.bootstrapper.exe
. -
Download and install the dependencies with
mono .paket/paket.exe install
. -
Compile the code:
cd wsnextui/WsNextui
xbuild
- Exectute the self-hosted web server:
cd bin
mono WsNextui.exe
- Check the following URL with your browser:
http://localhost:9000
- Projects created with Ionide seem to generate
.fsproj
with wrong paths (look at those with..\packages\...
). - There are some issues about running
Client-Server Web Application as .NET module 1 with
xsp4
(Mono's web server for development or testing). - The file
Web.config
is a little tricky. For WsNextui,Web.config
should be present in the source code directory for the compilation step in order to have the compiled JS (F# to JS) files, even if this file is empty (look at this question).
[1]: These kind of projects don't generate .exe
files,
but only .dll
files.
PRs and "issues" are more than welcome! :-)