SAFE Dojo
This self-study repository is designed to allow you to experience the SAFE stack based on a ready-made application that you can build on top of. It will take around 90 minutes for you to complete if you have no experience in any of these technologies.
The master
branch contains the dojo to complete. Please read the instructions.md for a guide on completing this dojo, to learn all about the SAFE Stack and F#. There is a "completed" version in the suggested-solution
branch.
Install pre-requisites
You'll need to install the following pre-requisites in order to build SAFE applications
Starting the application
Before you run the project for the first time only you must install dotnet "local tools" with this command:
dotnet tool restore
Open the editor:
code .
Build and run in watch mode using the following command:
dotnet run
NOTE: You may have to allow
dotnet
orServer
access to your public and/or private network.
Then open http://localhost:8080
in your browser. Arrange the windows so you can see both Code editor and the web browser.
Use the app
Type a UK postcode into the web app, e.g. "SW1A 2AA". Press "Fetch"
Completing the tasks
Search files (Ctrl+Shift+F or Edit --> Find in Files) and search through for "Task 1" to start completing the Dojo.
See Instructions.md for further details and hints about the tasks.
Going further: bundling your app
There is Bundle
to package your app:
dotnet run -- Bundle
Going further: deploying to Azure
This requires these prerequisites:
First time run
az login
Then set the name of your app in Build.fs. The name must be globally unique and contain only alphanumeric or hyphen characters.
let web = webApp {
name "my-cool-app" // set the name of your app here
...
To deploy to Azure:
dotnet run -- Azure
SAFE Stack Documentation
If you want to know more about the full Azure Stack and all of it's components (including Azure) visit the official SAFE documentation.
You will find more documentation about the used F# components at the following places: