JordanMarr / fable-lit-fullstack-template

A SAFE-style template with Fable.Lit, Fable.Remoting and Giraffe
MIT License
58 stars 1 forks source link

Build script to run both Server/Client at the same time #8

Open leolorenzoluis opened 1 year ago

JordanMarr commented 1 year ago

I'm not sure what the request is here.

leolorenzoluis commented 1 year ago

I have to run separate shell scripts to run the Server and Client. In NPM I can run both the server and client with 1 command. I'm sure it's possible just not sure how to code that with FAKE

JordanMarr commented 1 year ago

I personally prefer to launch them separately, but you certainly could do this via FAKE.

If you are more comfortable with npm, you could bypass FAKE altogether and just use npm script runner. Just add a "dev" script to your 'packages.json' file:

"scripts": {
  "api": "dotnet watch --project ../WebApi/WebApi.fsproj run",
  "dev": "concurrently --kill-others \"npm run start\" \"npm run api\""
  "start": ...
)

then: npm run dev

You will also have to install concurrently if you go this route. See https://stackoverflow.com/questions/30950032/how-can-i-run-multiple-npm-scripts-in-parallel