Skip to content

Commit

Permalink
Merge pull request #54 from snipsco/frontend-host
Browse files Browse the repository at this point in the history
added the forntend host for webpack
  • Loading branch information
ledoux authored Aug 3, 2017
2 parents bde6890 + 788563d commit 232b8a2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/methods/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export function setAllTypesAndServersEnvironment () {
}

export function setFrontendEnvironment () {
const { backend, project } = this
const { backend, project, type } = this
if (typeof project.config.frontend === 'undefined') {
this.frontend = null
return
Expand All @@ -327,10 +327,13 @@ export function setFrontendEnvironment () {
this.setBackendEnvironment()
}
const serverNames = Object.keys(backend.serversByName)
frontend.serverName = frontend.serverName ||
const frontendServerName = frontend.serverName ||
serverNames.find(serverName => /\w+-webrouter/.test(serverName)) ||
serverNames.find(serverName => /\w+-websocket/.test(serverName))

const frontendServer = backend.serversByName[frontendServerName]
frontend.serverName = frontendServerName
frontend.server = frontendServer
frontend.run = frontendServer.runsByTypeName[type.name]
}

export function getActivatedPythonVenvCommand () {
Expand Down

0 comments on commit 232b8a2

Please sign in to comment.