Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion serverless.component.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: websocket
version: 0.3.0
version: 0.3.1
author: Tencent Cloud, Inc.
org: Tencent Cloud, Inc.
description: Deploys websocket service on Tencent Cloud.
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const CONFIGS = {
compName: 'websocket',
compFullname: 'Websocket',
defaultEntryFile: 'sls.js',
handler: 'handler.socket',
handler: 'handler.handler',
region: 'ap-guangzhou',
runtime: 'Nodejs10.15',
namespace: 'default',
Expand Down
7 changes: 2 additions & 5 deletions src/serverless.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,20 +206,17 @@ class ServerlessComponent extends Component {
const [faasOutputs, apigwOutputs = {}] = await Promise.all(deployTasks)
const { wsBackUrl } = apigwOutputs[regionList[0]]

this.state.wsBackUrl = wsBackUrl
outputs.wsBackUrl = wsBackUrl

await this.updateFaas(credentials, faasConfig, regionList, wsBackUrl)

// optimize outputs for one region
if (regionList.length === 1) {
const [oneRegion] = regionList
outputs.region = oneRegion
outputs['apigw'] = apigwOutputs[oneRegion]
outputs['scf'] = faasOutputs[oneRegion]
outputs['faas'] = faasOutputs[oneRegion]
} else {
outputs['apigw'] = apigwOutputs
outputs['scf'] = faasOutputs
outputs['faas'] = faasOutputs
}

this.state.region = regionList[0]
Expand Down