Skip to content

Instantly share code, notes, and snippets.

@ninjarobot
Created August 22, 2018 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ninjarobot/089e18a6afe3151b413490110e24111b to your computer and use it in GitHub Desktop.
Save ninjarobot/089e18a6afe3151b413490110e24111b to your computer and use it in GitHub Desktop.
Script to make a build a tiny running Suave server
#!/bin/bash
dotnet new console -n littleSuaveApp -lang F#;
cd littleSuaveApp;
dotnet add package suave;
awk '/open System/{print "open Suave"}; /0/{print " startWebServer { defaultConfig with bindings = [ HttpBinding.createSimple HTTP \"0.0.0.0\" 8080 ] } (Successful.OK \"Hello World!\")"}1' Program.fs > tmp.fs;
mv tmp.fs Program.fs;
dotnet publish -c Release;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment