Skip to content

Commit

Permalink
Merge pull request #73 from bavix/ui-upgrade
Browse files Browse the repository at this point in the history
ui upgrade
  • Loading branch information
rez1dent3 authored Dec 15, 2023
2 parents d5ac234 + c7da028 commit f33a5a8
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 106 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/compile-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ jobs:
contents: write
uses: bavix/.github/.github/workflows/[email protected]
secrets: inherit
with:
nodejs: 21.x
11 changes: 11 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: go release

on:
release:
types: [created]

jobs:
build_uuid_ui:
permissions:
contents: write
uses: bavix/.github/.github/workflows/[email protected]
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-alpine
FROM node:21.4-alpine3.19

WORKDIR /app
COPY . /app
Expand Down
26 changes: 26 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package main

import (
"embed"
"errors"
"io/fs"
"log"
"net/http"
)

//go:embed public
var staticFiles embed.FS

func main() {
htmlContent, err := fs.Sub(staticFiles, "public")
if err != nil {
log.Fatal(err)
}

http.Handle("/", http.FileServer(http.FS(htmlContent)))

err = http.ListenAndServe(":8080", nil)
if err != nil && !errors.Is(err, http.ErrServerClosed) {
log.Fatal(err)
}
}
Loading

0 comments on commit f33a5a8

Please sign in to comment.