Skip to content

Commit

Permalink
use 3030
Browse files Browse the repository at this point in the history
  • Loading branch information
olayway committed Feb 6, 2023
1 parent efed6dc commit 631766d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/template-e2e/playwright.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

// it seems, for github workflow to work, port needs to be different than 3000
const PORT = 3000;
const PORT = 3030;

// Set webServer.url and use.baseURL with the location of the WebServer respecting the correct set port
const baseURL = `http://localhost:${PORT}`;
Expand All @@ -25,7 +25,8 @@ const config = {
// Run your local dev server before starting the tests:
// https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests
webServer: {
command: `pnpm nx serve`,
// TODO can port be forwarded to original serve target instead of creatinga new one only for this purpose?
command: `pnpm nx serve:e2e`,
port: PORT,
timeout: 60 * 1000,
reuseExistingServer: !process.env.CI,
Expand Down
8 changes: 8 additions & 0 deletions packages/template/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
},
"dependsOn": ["^build"]
},
"serve:e2e": {
"executor": "nx:run-commands",
"options": {
"command": "npm run dev -- -p 3030",
"cwd": "packages/template"
},
"dependsOn": ["^build"]
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
Expand Down

0 comments on commit 631766d

Please sign in to comment.