Skip to content

Latest commit

 

History

History
 
 

BCKG REST API using SAFE Template

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?

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

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.

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:

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
)