fable-lit-fullstack-template icon indicating copy to clipboard operation
fable-lit-fullstack-template copied to clipboard

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

Open leolorenzoluis opened this issue 3 years ago • 3 comments

leolorenzoluis avatar Aug 17 '22 00:08 leolorenzoluis

I'm not sure what the request is here.

JordanMarr avatar Aug 18 '22 14:08 JordanMarr

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

leolorenzoluis avatar Aug 18 '22 16:08 leolorenzoluis

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

JordanMarr avatar Aug 23 '22 19:08 JordanMarr