This commit is contained in:
Eugene Pankov 2021-07-26 21:00:13 +02:00
parent 427a245b24
commit f818dbf03e
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
4 changed files with 7 additions and 3 deletions

View File

@ -15,5 +15,5 @@ COPY manage.py gunicorn.conf.py ./
COPY tabby tabby COPY tabby tabby
COPY start.sh /start.sh COPY start.sh /start.sh
RUN chmod +x /start.sh RUN ["chmod", "+x", "/start.sh"]
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -118,7 +118,7 @@ export class HomeComponent {
const versions = await this.http.get('/api/1/versions').toPromise() const versions = await this.http.get('/api/1/versions').toPromise()
versions.sort((a, b) => -semverCompare(a.version, b.version)) versions.sort((a, b) => -semverCompare(a.version, b.version))
this.connector = new DemoConnector(this.iframe.nativeElement.contentWindow, this.commonService, versions[0]) this.connector = new DemoConnector(this.iframe.nativeElement.contentWindow, this.commonService, versions[0])
this.iframe.nativeElement.src = '/terminal.html' this.iframe.nativeElement.src = '/terminal'
} }
ngOnDestroy (): void { ngOnDestroy (): void {

View File

@ -80,7 +80,7 @@ export class MainComponent {
async loadApp (config, version) { async loadApp (config, version) {
this.showApp = true this.showApp = true
this.iframe.nativeElement.src = '/terminal.html' this.iframe.nativeElement.src = '/terminal'
await this.http.patch(`/api/1/configs/${config.id}`, { await this.http.patch(`/api/1/configs/${config.id}`, {
last_used_with_version: version.version, last_used_with_version: version.version,
}).toPromise() }).toPromise()

View File

@ -39,6 +39,10 @@ function start () {
res.render('index', { req }) res.render('index', { req })
}) })
app.get(['/terminal'], (req, res) => {
res.sendFile(join(DIST_FOLDER, 'terminal.html'))
})
process.umask(0o002) process.umask(0o002)
app.listen(PORT, () => { app.listen(PORT, () => {
console.log(`Node Express server listening on http://localhost:${PORT}`) console.log(`Node Express server listening on http://localhost:${PORT}`)