fix(api-gateway): home server home page (#949)

* feat: add home server home page message

* fix: upgrade yarn
This commit is contained in:
Karol Sójko
2023-12-01 09:32:56 +01:00
committed by GitHub
parent 589b740f49
commit a82192db42
7 changed files with 1031 additions and 965 deletions
@@ -1,9 +1,18 @@
import { Request, Response } from 'express'
import { BaseHttpController, all, controller, results } from 'inversify-express-utils'
@controller('')
export class FallbackController extends BaseHttpController {
@all('*')
public async fallback(): Promise<results.NotFoundResult> {
public async fallback(request: Request, response: Response): Promise<void | results.NotFoundResult> {
if (request.path === '/' && request.method === 'GET') {
response.send(
'<!DOCTYPE html><html lang="en"><head><meta name="robots" content="noindex"></head><body>Your home server is up and running! Enter the URL of this page into Standard Notes when registering or signing in to begin using your home server.</body></html>',
)
return
}
return this.notFound()
}
}