Skip to content

Commit

Permalink
fix(serve): init local server on serve
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiandg7 committed Mar 14, 2021
1 parent 59434be commit 7e4c859
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/nx-shopify/src/executors/serve/serve.executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function serveExecutor(
open,
allowLive,
} = options;

const targetConfig = parseTargetString(buildTarget);
const buildOptions: BuildExecutorSchema = getBuildOptions(options, context);
const normalizedBuildOptions = normalizeBuildOptions(
Expand Down Expand Up @@ -81,7 +81,7 @@ export async function serveExecutor(
address: ipAddress,
openBrowser: open,
});

const assetServer = new LocalAssetServer({
allowLive,
skipFirstDeploy,
Expand All @@ -91,8 +91,9 @@ export async function serveExecutor(
devServer,
themekitEnvConfig,
});
return { success: true };
return assetServer.start(options);
return new Promise(() => {
assetServer.start(options);
});
} catch (error) {
// console.error(chalk.red(`- ${error}`));
console.error(error);
Expand Down

0 comments on commit 7e4c859

Please sign in to comment.