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 3.1 or higher.
- npm package manager.
- Node LTS.
Before you run the project for the first time only you must install dotnet "local tools" with this command:
dotnet tool restore
To concurrently run the server and the client components in watch mode use the following command:
dotnet fake build -t run
Then open http://localhost:8080
in your browser.
To run concurrently server and client tests in watch mode (run in a new terminal):
dotnet fake build -t runtests
Client tests are available under http://localhost:8081
in your browser and server tests are running in watch mode in console.
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:
Test links:
To run the server against a local storage edit build.fsx:
Target.create "Run" (fun _ ->
dotnet "build" sharedPath ""
[ async { dotnet "watch run" serverPath "--local --port 8085" }
async { npm "run start" "." } ]
|> Async.Parallel
|> Async.RunSynchronously
|> ignore
)
To run the server against a different end point:
Target.create "Run" (fun _ ->
dotnet "build" sharedPath ""
[ async { dotnet "watch run" serverPath "--connectionstring <Storage connection string> --port 8085" }
async { npm "run start" "." } ]
|> Async.Parallel
|> Async.RunSynchronously
|> ignore
)