Skip to content

Commit cfc0dc2

Browse files
Merge pull request #6346 from alphagov/log-review-app-start
2 parents a3f5c2e + 8cfe5cf commit cfc0dc2

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

packages/govuk-frontend-review/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"license": "MIT",
1111
"scripts": {
12-
"dev": "gulp dev --color",
12+
"dev": "cross-env-shell REVIEW_APP_SILENT_START=true gulp dev --color",
1313
"prebuild": "npm run clean",
1414
"build": "gulp build --color",
1515
"build:sassdoc": "sassdoc --config sassdoc.config.yaml ../govuk-frontend/src/govuk",
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
import { ports } from '@govuk-frontend/config'
1+
import { ports, urls } from '@govuk-frontend/config'
22

33
import app from './app.mjs'
44

55
const server = await app()
66

7-
server.listen({
8-
host: process.env.ALLOW_EXTERNAL_CONNECTIONS ? null : 'localhost',
9-
port: ports.app
10-
})
7+
server.listen(
8+
{
9+
host: process.env.ALLOW_EXTERNAL_CONNECTIONS ? null : 'localhost',
10+
port: ports.app
11+
},
12+
() => {
13+
// Allow to disable the startup logs to avoid confusing users
14+
// if other URLs are showed on screen (Browsersync's URLs, for ex.)
15+
if (!process.env.REVIEW_APP_SILENT_START) {
16+
console.log(`Review app started at ${urls.app}`)
17+
}
18+
}
19+
)

0 commit comments

Comments
 (0)