mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-18 23:36:05 +01:00
fixup
This commit is contained in:
@@ -8,6 +8,7 @@ import { enableProdMode } from '@angular/core'
|
||||
import { ngExpressEngine } from '@nguniversal/express-engine'
|
||||
|
||||
import * as express from 'express'
|
||||
|
||||
import { join } from 'path'
|
||||
|
||||
|
||||
@@ -42,7 +43,19 @@ function start () {
|
||||
}))
|
||||
|
||||
app.get(['/', '/app', '/login'], (req, res) => {
|
||||
res.render('index', { req })
|
||||
res.render(
|
||||
'index',
|
||||
{
|
||||
req,
|
||||
providers: [
|
||||
{ provide: 'BACKEND_URL', useValue: process.env.BACKEND_URL ?? '' },
|
||||
],
|
||||
},
|
||||
(err: Error, html: string) => {
|
||||
html = html.replace('{{backendURL}}', process.env.BACKEND_URL ?? '')
|
||||
res.status(err ? 500 : 200).send(html || err.message)
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
app.get(['/terminal'], (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user