Allow running desktop and web apps simultaneously in dev mode

This commit is contained in:
Manav Rathi 2024-11-21 08:09:19 +05:30
parent 252587ffa5
commit e4023f66f2
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@
"build:quick": "yarn build-renderer && yarn build-main:quick", "build:quick": "yarn build-renderer && yarn build-main:quick",
"dev": "concurrently --kill-others --success first --names 'main,rndr' \"yarn dev-main\" \"yarn dev-renderer\"", "dev": "concurrently --kill-others --success first --names 'main,rndr' \"yarn dev-main\" \"yarn dev-renderer\"",
"dev-main": "tsc && electron .", "dev-main": "tsc && electron .",
"dev-renderer": "cross-env-shell _ENTE_IS_DESKTOP=1 \"cd ../web && yarn install && yarn dev:photos\"", "dev-renderer": "cross-env-shell _ENTE_IS_DESKTOP=1 \"cd ../web && yarn install && yarn workspace photos next dev -p 3008\"",
"postinstall": "electron-builder install-app-deps", "postinstall": "electron-builder install-app-deps",
"lint": "yarn prettier --check --log-level warn . && yarn eslint && yarn tsc", "lint": "yarn prettier --check --log-level warn . && yarn eslint && yarn tsc",
"lint-fix": "yarn prettier --write --log-level warn . && yarn eslint && yarn tsc" "lint-fix": "yarn prettier --write --log-level warn . && yarn eslint && yarn tsc"

View File

@ -187,13 +187,13 @@ const logStartupBanner = () => {
* *
* It uses protocol handlers to serve files from the "ente://" protocol. * It uses protocol handlers to serve files from the "ente://" protocol.
* *
* - In development this is proxied to http://localhost:3000 * - In development this is proxied to http://localhost:3008
* - In production it serves files from the `/out` directory * - In production it serves files from the `/out` directory
* *
* For more details, see this comparison: * For more details, see this comparison:
* https://github.com/HaNdTriX/next-electron-server/issues/5 * https://github.com/HaNdTriX/next-electron-server/issues/5
*/ */
const setupRendererServer = () => serveNextAt(rendererURL); const setupRendererServer = () => serveNextAt(rendererURL, { port: 3008 });
/** /**
* Register privileged schemes. * Register privileged schemes.