Skip to content

Commit

Permalink
fix(create): Fix use of deprecated port option
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed May 12, 2020
1 parent b212c23 commit 96765b4
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/create/src/create-vendure-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ program
.version(packageJson.version)
.arguments('<project-directory>')
.usage(`${chalk.green('<project-directory>')} [options]`)
.action(name => {
.action((name) => {
projectName = name;
})
.option(
Expand Down Expand Up @@ -116,7 +116,7 @@ async function createApp(
{
title: 'Installing dependencies',
task: (() => {
return new Observable(subscriber => {
return new Observable((subscriber) => {
subscriber.next('Creating package.json');
fs.writeFileSync(
path.join(root, 'package.json'),
Expand All @@ -137,14 +137,14 @@ async function createApp(
}
})
.then(() => subscriber.complete())
.catch(err => subscriber.error(err));
.catch((err) => subscriber.error(err));
});
}) as any,
},
{
title: 'Generating app scaffold',
task: ctx => {
return new Observable(subscriber => {
task: (ctx) => {
return new Observable((subscriber) => {
fs.ensureDirSync(path.join(root, 'src'));
const assetPath = (fileName: string) => path.join(__dirname, '../assets', fileName);
const srcPathScript = (fileName: string): string =>
Expand Down Expand Up @@ -179,13 +179,13 @@ async function createApp(
subscriber.next(`Copied email templates`);
subscriber.complete();
})
.catch(err => subscriber.error(err));
.catch((err) => subscriber.error(err));
});
},
},
{
title: 'Initializing server',
task: async ctx => {
task: async (ctx) => {
try {
if (usingTs) {
// register ts-node so that the config file can be loaded
Expand All @@ -212,7 +212,10 @@ async function createApp(
await checkDbConnection(config.dbConnectionOptions, root);
return bootstrap({
...config,
port,
apiOptions: {
...(config.apiOptions ?? {}),
port,
},
silent: logLevel === 'silent',
dbConnectionOptions: {
...config.dbConnectionOptions,
Expand Down

0 comments on commit 96765b4

Please sign in to comment.