Giter Site home page Giter Site logo

safeperla's Introduction

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 run

Then open http://localhost:8080 in your browser.

The build project in root directory contains a couple of different build targets. You can specify them after -- (target name is case-insensitive).

To run concurrently server and client tests in watch mode (you can run this command in parallel to the previous one in new terminal):

Finally, there are Bundle and Azure targets that you can use to package your app and deploy to Azure, respectively:

dotnet run -- Bundle
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:

safeperla's People

Contributors

angelmunoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

safeperla's Issues

System.IO.DirectoryNotFoundException on first dotnet run

Hi @AngelMunoz I've been brought here from SAFE-Stack/SAFE-template#532 and wanted to give Perla a shot. For some reason when I do dotnet run on a fresh repository, following exception is thrown:

...
server: /Users/theimowski/oss/AngelMunoz/SafePerla/src/Server> dotnet watch run
client: /Users/theimowski/oss/AngelMunoz/SafePerla/src/Client> dotnet perla serve
/Users/theimowski/oss/AngelMunoz/SafePerla/src/Server> "dotnet" watch run (In: false, Out: true, Err: true)
/Users/theimowski/oss/AngelMunoz/SafePerla/src/Client> "dotnet" perla serve (In: false, Out: true, Err: true)
client: Perla: Checking whether esbuild is present...
client: Perla: esbuild is present.
client: Perla:Serve: Starting Dev Server
client: Perla:Serve: Starting Fable
client: Unhandled exception. System.IO.DirectoryNotFoundException: /Users/theimowski/oss/AngelMunoz/SafePerla/src/Client/output/
client:    at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
client:    at Perla.Lib.Server.devServer(PerlaConfig config) in /Users/tuna/repos/Perla/src/Perla.Lib/Server.fs:line 656
client:    at Perla.Lib.Server.startServer(PerlaConfig config) in /Users/tuna/repos/Perla/src/Perla.Lib/Server.fs:line 706
client:    at [email protected](Unit unitVar) in /Users/tuna/repos/Perla/src/Perla.Lib/Server.fs:line 725
client:    at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 508
client:    at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112
client: --- End of stack trace from previous location ---
client:    at [email protected](ExceptionDispatchInfo edi) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1167
client:    at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112
client:    at <StartupCode$FSharp-Core>[email protected](Object o) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 195
client:    at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
client:    at System.Threading.ThreadPoolWorkQueue.Dispatch()
client:    at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
client:    at System.Threading.Thread.StartCallback()
server: dotnet watch ๐Ÿš€ Started
...

interestingly, after I cancel the run, the directory is there and subsequent dotnet run works fine - smells like some kind of race condition possibly?
I'm using MacOS FWIW

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.