Please check out a more up to date exmaple here.
This template can be used to generate a full-stack web application using the SAFE Stack. It was created using the dotnet SAFE Template. If you want to learn more about the template why not start with the quick start guide?
You'll need to install the following pre-requisites in order to build SAFE applications
- The .NET Core SDK
- FAKE 5 installed as a global tool
- The Yarn package manager (you an also use
npm
but the usage ofyarn
is encouraged). - Node LTS installed for the front end components.
- If you're running on OSX or Linux, you'll also need to install Mono.
nuget Microsoft.AspNetCore.Identity.EntityFrameworkCore
nuget Microsoft.AspNetCore.Identity.UI 3.0.0
nuget Microsoft.EntityFrameworkCore.InMemory
nuget Microsoft.EntityFrameworkCore.SqlServer
nuget Microsoft.EntityFrameworkCore.Tools 3.0.0
This allows to either use and InMemory storage of users or to use an Sql Server. If you don't want to use the Sql Server you can delete the EFIdentityDummyProject.
The EFIdentityDummyProject is used to create the databases used by the Identity framework. To accomplish this, open the solution in Visual Studio -> Tools -> Nuget Package Manager -> Package Manager Console und navigate to the EFIdentityDummyProject - folder (use dir
to check current location and cd ThisCouldBeYourPath\EFIdentityDummyProject
to navigate to the folder containing the Startup.cs file) then type Update-Database -Project EFIdentityDummyProject -StartupProject EFIdentityDummyProject
and the necessary databases will be build.
(source)
To concurrently run the server and the client components in watch mode use the following command:
fake build -t Run
You will find more documentation about the used F# components at the following places:
If you want to know more about the full Azure Stack and all of it's components (including Azure) visit the official SAFE documentation.
- fake not found - If you fail to execute
fake
from command line after installing it as a global tool, you might need to add it to yourPATH
manually: (e.g.export PATH="$HOME/.dotnet/tools:$PATH"
on unix) - related GitHub issue