Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Ensure server uses port defined by the app
  • Loading branch information
fluiddot committed Apr 24, 2024
commit 9b54b8cb143dbdec01f81dabf665c8f2653ec73d
2 changes: 1 addition & 1 deletion vendor/wp-now/src/start-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function startServer(
app.use(fileUpload({ defCharset: 'utf8', defParamCharset: 'utf8'}));
app.use(compression({ filter: shouldCompress }));
app.use(addTrailingSlash('/wp-admin'));
const port = await portFinder.getOpenPort();
const port = options.port ?? await portFinder.getOpenPort();
const { php, options: wpNowOptions } = await startWPNow(options);

app.use('/', async (req, res) => {
Expand Down