Feature: Tail live logs (#27)

* chore: add new yarn.lock

* chore: add pkgs

* feat: push events via server-sent-events

* feat(web): tail live logs

* fix: update irc network

* fix: set baseurl

* fix: headers
This commit is contained in:
Ludvig Lundgren 2021-09-07 22:23:27 +02:00 committed by GitHub
parent 11fcf1ead9
commit 09eb0b1716
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 213 additions and 26 deletions

View file

@ -21,6 +21,18 @@ export function baseUrl() {
return baseUrl
}
// get sseBaseUrl for SSE
export function sseBaseUrl() {
let {origin} = window.location
let env = process.env.NODE_ENV
if (env === "development") {
return `http://localhost:8989/`
}
return `${origin}${baseUrl()}`
}
export function buildPath(...args: string[]): string {
const [first] = args;
const firstTrimmed = first.trim();