File tree Expand file tree Collapse file tree 16 files changed +293
-2772
lines changed
Expand file tree Collapse file tree 16 files changed +293
-2772
lines changed Original file line number Diff line number Diff line change 1- node_modules
1+
2+ # Created by https://www.toptal.com/developers/gitignore/api/macos,go
3+ # Edit at https://www.toptal.com/developers/gitignore?templates=macos,go
4+
5+ # ## Go ###
6+ # If you prefer the allow list template instead of the deny list, see community template:
7+ # https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
8+ #
9+ # Binaries for programs and plugins
10+ * .exe
11+ * .exe~
12+ * .dll
13+ * .so
14+ * .dylib
15+
16+ # Test binary, built with `go test -c`
17+ * .test
18+
19+ # Output of the go coverage tool, specifically when used with LiteIDE
20+ * .out
21+
22+ # Dependency directories (remove the comment below to include it)
23+ # vendor/
24+
25+ # Go workspace file
26+ go.work
27+
28+ # ## Go Patch ###
29+ /vendor /
30+ /Godeps /
31+
32+ # ## macOS ###
33+ # General
234.DS_Store
35+ .AppleDouble
36+ .LSOverride
37+
38+ # Icon must end with two \r
39+ Icon
40+
41+
42+ # Thumbnails
43+ ._ *
44+
45+ # Files that might appear in the root of a volume
46+ .DocumentRevisions-V100
47+ .fseventsd
48+ .Spotlight-V100
49+ .TemporaryItems
50+ .Trashes
51+ .VolumeIcon.icns
52+ .com.apple.timemachine.donotpresent
53+
54+ # Directories potentially created on remote AFP share
55+ .AppleDB
56+ .AppleDesktop
57+ Network Trash Folder
58+ Temporary Items
59+ .apdisk
60+
61+ # End of https://www.toptal.com/developers/gitignore/api/macos,go
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- FROM node
2- WORKDIR /src
1+ FROM golang:1.17 as build
32
4- # Separate copy to cache node modules
5- COPY package*.json ./
6- RUN npm i
3+ WORKDIR /build
74
8- # Copy everything else over
9- COPY . .
5+ COPY go.mod ./
6+ COPY go.sum ./
7+ RUN go mod download
8+ RUN go mod verify
109
11- # Run!
12- EXPOSE 3000
13- ENV COFFEE_PORT=3000
14- CMD ["npm" , "start" ]
10+ COPY main.go ./
11+ COPY frames/ ./frames/
12+ COPY static/ ./static/
13+
14+ RUN go build -a -ldflags='-extldflags=-static' -o 'tiny.coffee'
15+
16+ FROM gcr.io/distroless/base-debian11
17+
18+ COPY --from=build /build/tiny.coffee /
19+
20+ CMD [ "/tiny.coffee" ]
Original file line number Diff line number Diff line change 11# tiny.coffee
22
3- Fork of [ ` parrot.live ` ] ( https://github.com/hugomd/parrot.live ) ,
4- to allow any computer with ` curl ` to display an _ animated_ cup of coffee.
3+ Fork of [ ` parrot.live ` ] ( https://github.com/hugomd/parrot.live ) , but with 100% less parrot and 100% more coffee. And now in go!
54
6- ## Try it!
7- ``` bash
8- curl -L tiny.coffee
5+ ## ☕ Try it
6+ ``` console
7+ $ curl tiny.coffee
98```
109
11- ## Contributors
12- If someone can fix my horrible ascii art, pls contribute
10+ ## ⚙️ Run it
11+
12+ Zero deps and only two env vars, ` HOST ` and ` PORT ` . Go wild.
13+
14+ ### Go (>=1.16)
15+
16+ ``` console
17+ $ go build main.go
18+ ```
19+
20+ ### Container
21+
22+ ``` console
23+ $ podman run -p 8000:8000 ghcr.io/robherley/tiny.coffee
24+ ```
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- ) ) (
2- _______(_______
3- / ( ) \
4- \_______________/
5- | ╞═══╗
6- | ╞═╗ ║
7- | COFFEE | ║ ║
8- | ╞═╝ ║
9- | ╞═══╝
10- \_____________/
1+ *
2+ .-~~*.
3+ ,|`*__-'|
4+ || |
5+ `| |
6+ `-__-'
Original file line number Diff line number Diff line change 1- (
2- ___(_______)___
3- / ) ( \
4- \_______________/
5- | ╞═══╗
6- | ╞═╗ ║
7- | COFFEE | ║ ║
8- | ╞═╝ ║
9- | ╞═══╝
10- \_____________/
1+ *
2+ .*~~-.
3+ ,|`-__-'|
4+ || |
5+ `| |
6+ `-__-'
Original file line number Diff line number Diff line change 1- ( )
2- ___)_______(___
3- / ) \
4- \_______________/
5- | ╞═══╗
6- | ╞═╗ ║
7- | COFFEE | ║ ║
8- | ╞═╝ ║
9- | ╞═══╝
10- \_____________/
1+ *
2+ .-~~-.
3+ ,|`-*_-'|
4+ || |
5+ `| |
6+ `-__-'
Original file line number Diff line number Diff line change 1- ) (
2- _______)_______
3- / ( \
4- \_______________/
5- | ╞═══╗
6- | ╞═╗ ║
7- | COFFEE | ║ ║
8- | ╞═╝ ║
9- | ╞═══╝
10- \_____________/
1+
2+ .-*~-.
3+ ,|`-__*'|
4+ || |
5+ `| |
6+ `-__-'
Original file line number Diff line number Diff line change 1+ module github.com/robherley/tiny.coffee
2+
3+ go 1.17
You can’t perform that action at this time.
0 commit comments