Skip to content

Commit

Permalink
feat(runtime): support process.env in runtime (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow authored Apr 24, 2023
1 parent 7a87bea commit f0f1582
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions runtimes/nodejs/src/support/cloud-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ function createCloudSdk() {
},
sockets: WebSocketAgent.clients,
appid: Config.APP_ID,
env: {
DB_URI: Config.DB_URI,
SERVER_SECRET: Config.SERVER_SECRET,
RUNTIME_IMAGE: Config.RUNTIME_IMAGE,
...process.env,
},
env: process.env,
}

/**
Expand Down
2 changes: 1 addition & 1 deletion runtimes/nodejs/src/support/function-engine/vm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class FunctionVm {
clearInterval: clearInterval,
setTimeout: setTimeout,
clearTimeout: clearTimeout,
process: { env: {} },
process: { env: process.env },
URL: URL,
fetch: globalThis.fetch,
global: null,
Expand Down

0 comments on commit f0f1582

Please sign in to comment.