ch 3

SAFE Introduciton

SAFE Stack😎

https://safe-stack.github.io/

Why SAFE Stack?

SAFE

  • Saturn
    • Lightweight and simple server-side programming
  • Azure
    • For Hosting and Services
  • Fable
    • F# in the Browser
  • Elmish
    • For simple to understand web app development

Install pre-requisites

SAFE template

Create your first SAFE app

Install SAFE template

  1. Open a command prompt
  2. Create a new directory on your machine and navigate into it
  3. Enter dotnet new -i SAFE.Template to install the SAFE project template (only required once)

Run the App

  1. Enter dotnet new SAFE to create a new SAFE project
  2. Enter dotnet tool restore to install local tools like Fable.
  3. Enter dotnet run to build and run the app
  4. Open a web browser and navigate to http://localhost:8080.

Template Structure

./src/

App

References

https://www.compositional-it.com/consultancy/safe-stack/ https://safe-stack.github.io/docs/quickstart/

return to Outline