Skip to content

Commit

Permalink
fix nginx template
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Jun 15, 2022
1 parent 4687a05 commit 2f1599d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ export class Cluster {
public async setupNginx(pwd: string, appPort: number, proto: string): Promise<void> {
this._port++
const dir = await mkdtemp(join(tmpdir(), 'openbmclapi'))
const confFile = proto === 'https' ? `${dir}/nginx/nginx.conf` : `${dir}/nginx/nginx-http.conf`
const confTemplate = await readFile(join(__dirname, '..', 'nginx', 'nginx.conf'), 'utf8')
const confFile = `${dir}/nginx/nginx.conf`
const templateFile = proto === 'https' ? 'nginx.conf' : 'nginx-http.conf'
const confTemplate = await readFile(join(__dirname, '..', 'nginx', templateFile), 'utf8')
console.log('nginx conf', confFile)

await copy(join(__dirname, '..', 'nginx'), dirname(confFile), {recursive: true, overwrite: true})
Expand Down

0 comments on commit 2f1599d

Please sign in to comment.