Added messages with Emojis

pull/4/head
Quentin McGaw 6 years ago
parent 8d3b2658f0
commit 32394f4f8b

@ -11,13 +11,14 @@ RUN apk --update add git build-base upx
WORKDIR /go/src/app
COPY main.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags="-s -w" -installsuffix cgo -o server . && \
upx -v --best --overlay=strip server && \
upx -v --best --ultra-brute --overlay=strip server && \
upx -t server
FROM scratch
LABEL maintainer="quentin.mcgaw@gmail.com" \
description="StackEdit server in a lightweight Docker container" \
size="29.6MB" \
download="???MB" \
size="???MB" \
ram="7MB" \
cpu_usage="Very low" \
github="https://github.com/qdm12/stackedit-docker"

@ -24,7 +24,7 @@ Stackedit build:
| Download size | Image size | RAM usage | CPU usage |
| --- | --- | --- | --- |
| 15.6MB | 45.5MB | 7MB | Very low |
| ???MB | ???MB | 7MB | Very low |
## Features

@ -1,13 +1,25 @@
package main
import (
"fmt"
"log"
"net/http"
"github.com/kyokomi/emoji"
)
const listeningPort = "80"
func main() {
fmt.Println("#####################################")
fmt.Println("########## StackEdit Server #########")
fmt.Println("########## by Quentin McGaw #########")
fmt.Println("########## Give some " + emoji.Sprint(":heart:") + "at ##########")
fmt.Println("# github.com/qdm12/stackedit-docker #")
fmt.Print("#####################################\n\n")
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, r.URL.Path[1:])
})
log.Fatal(http.ListenAndServe(":80", nil))
log.Println("Web UI listening on 0.0.0.0:" + listeningPort + emoji.Sprint(" :ear:"))
log.Fatal(http.ListenAndServe("0.0.0.0:"+listeningPort, nil))
}

Loading…
Cancel
Save