mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-22 07:05:24 +00:00
Merge pull request #566 from nolanlawson/nolan/issue-565
fix: fix "sapper export" with a custom PORT
This commit is contained in:
@@ -55,7 +55,8 @@ async function _export({
|
|||||||
copy(path.join(build_dir, 'service-worker.js'), path.join(export_dir, 'service-worker.js'));
|
copy(path.join(build_dir, 'service-worker.js'), path.join(export_dir, 'service-worker.js'));
|
||||||
copy(path.join(build_dir, 'service-worker.js.map'), path.join(export_dir, 'service-worker.js.map'));
|
copy(path.join(build_dir, 'service-worker.js.map'), path.join(export_dir, 'service-worker.js.map'));
|
||||||
|
|
||||||
const port = await ports.find(3000);
|
const defaultPort = process.env.PORT ? parseInt(process.env.PORT) : 3000;
|
||||||
|
const port = await ports.find(defaultPort);
|
||||||
|
|
||||||
const protocol = 'http:';
|
const protocol = 'http:';
|
||||||
const host = `localhost:${port}`;
|
const host = `localhost:${port}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user