Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
869aab39
Unverified
Commit
869aab39
authored
Jan 16, 2023
by
Diptesh Choudhuri
Committed by
GitHub
Jan 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix standalone wrong url being logged (#44887)
Co-authored-by:
JJ Kasper
<
jj@jjsweb.site
>
parent
969cca87
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
utils.ts
packages/next/src/build/utils.ts
+1
-1
index.test.ts
test/production/standalone-mode/response-cache/index.test.ts
+13
-0
No files found.
packages/next/src/build/utils.ts
View file @
869aab39
...
@@ -1789,7 +1789,7 @@ server.listen(currentPort, (err) => {
...
@@ -1789,7 +1789,7 @@ server.listen(currentPort, (err) => {
console.log(
console.log(
'Listening on port',
'Listening on port',
currentPort,
currentPort,
'url: http://
localhost
:' + currentPort
'url: http://
' + hostname + '
:' + currentPort
)
)
})`
})`
)
)
...
...
test/production/standalone-mode/response-cache/index.test.ts
View file @
869aab39
...
@@ -15,6 +15,7 @@ describe('minimal-mode-response-cache', () => {
...
@@ -15,6 +15,7 @@ describe('minimal-mode-response-cache', () => {
let
next
:
NextInstance
let
next
:
NextInstance
let
server
let
server
let
appPort
let
appPort
let
output
=
''
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
// test build against environment with next support
// test build against environment with next support
...
@@ -59,11 +60,18 @@ describe('minimal-mode-response-cache', () => {
...
@@ -59,11 +60,18 @@ describe('minimal-mode-response-cache', () => {
/Listening on/
,
/Listening on/
,
{
{
...
process
.
env
,
...
process
.
env
,
HOSTNAME
:
''
,
PORT
:
appPort
,
PORT
:
appPort
,
},
},
undefined
,
undefined
,
{
{
cwd
:
next
.
testDir
,
cwd
:
next
.
testDir
,
onStdout
(
msg
)
{
output
+=
msg
},
onStderr
(
msg
)
{
output
+=
msg
},
}
}
)
)
})
})
...
@@ -72,6 +80,11 @@ describe('minimal-mode-response-cache', () => {
...
@@ -72,6 +80,11 @@ describe('minimal-mode-response-cache', () => {
if
(
server
)
await
killApp
(
server
)
if
(
server
)
await
killApp
(
server
)
})
})
it
(
'should have correct "Listening on" log'
,
async
()
=>
{
expect
(
output
).
toContain
(
`Listening on port`
)
expect
(
output
).
toContain
(
`url: http://localhost:
${
appPort
}
`
)
})
it
(
'should have correct responses'
,
async
()
=>
{
it
(
'should have correct responses'
,
async
()
=>
{
const
html
=
await
renderViaHTTP
(
appPort
,
'/'
)
const
html
=
await
renderViaHTTP
(
appPort
,
'/'
)
expect
(
html
.
length
).
toBeTruthy
()
expect
(
html
.
length
).
toBeTruthy
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment