diff --git a/src/commands/launch/functions.ts b/src/commands/launch/functions.ts index 8e5f46d..b989f61 100755 --- a/src/commands/launch/functions.ts +++ b/src/commands/launch/functions.ts @@ -29,6 +29,8 @@ export default class Functions extends Command { const currentWorkingDirectory = process.cwd(); const projectBasePath = flags['data-dir'] || currentWorkingDirectory; - await new Contentfly(projectBasePath).serveCloudFunctions(+flags.port); + const port = process.env.PORT || flags.port; + + await new Contentfly(projectBasePath).serveCloudFunctions(port); } }