@ma2i I have no idea if this is “best practice” but I use npm scripts to handle the backend server during development. My quasar project package.jon scripts section look like:
"scripts": { "lint": "eslint --ext .js,.vue ./", "dev-graphql": "cd ../graphql-knex-npvr/ && npm run-script dev ", "server-graphql": "cd ../graphql-knex-npvr/ && npm run-script start ", "server-quasar": "quasar serve dist/spa -p 2000 --cors -o ", "publish-client": "xcopy dist\\spa D:\\Users\\johni\\Projects\\graphql-knex-npvr\\public /s /d /e /y" },So, if I want to start the backend server in development mode, I open a New Terminal in VS Code and type the following
npm run dev-graphqlThis runs the script: dev-grapql that is contained in the quasar project package.json file.
The script(dev-graphql) performs 2 commands. The command are separated by &&. The first command changes the directory to point to the directory that contains the backend server. The second command runs a script call dev that is contained in the backend server project package-json file.
My backend server is nodejs using Express, SQLite, and graphql. Now that I have my backend running, I switch back to my first VS Code terminal and run
quasar devWhen I am finished for the day, I switch back to the second terminal and do ctrl-c to terminate the backend server.