specify host=127.0.0.1 in build.mjs for cors
This commit is contained in:
@@ -13,7 +13,8 @@ if(process.argv[2] === 'serve'){
|
|||||||
const context = await esbuild.context(config);
|
const context = await esbuild.context(config);
|
||||||
|
|
||||||
const {host, port} = await context.serve({
|
const {host, port} = await context.serve({
|
||||||
servedir: 'dist'
|
servedir: 'dist',
|
||||||
|
host: '127.0.0.1'
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(`Listening on http://${host}:${port}/`);
|
console.log(`Listening on http://${host}:${port}/`);
|
||||||
|
|||||||
Reference in New Issue
Block a user