Browse Source

health check & fixing text size for invite link in prod

main
forest 4 months ago
parent
commit
308538ed13
4 changed files with 28 additions and 3 deletions
  1. +2
    -1
      .gitignore
  2. +21
    -1
      README.md
  3. +4
    -0
      main.go
  4. +1
    -1
      static/app.css

+ 2
- 1
.gitignore View File

@ -3,4 +3,5 @@ user-content/*
node_modules
**/*.map
test_node2
federation_db
federation_db
graffiti

+ 21
- 1
README.md View File

@ -14,10 +14,30 @@ Second, run the go server:
go run .
```
### deployment
blah
`go build -v -tags 'osusergo netgo' -ldflags='-extldflags=-static' -o graffiti .`
```
collage.cyberia.club {
reverse_proxy {
to localhost:8082 localhost:8081
lb_policy first
health_uri /health
health_interval 5s
health_timeout 5s
}
log {
output file /home/cyberian/graffiti-access.log
}
}
```
### todo list
- admin panel where you can ban a user and everyone they invited + remove all their content
- deployment: check
- images only load once they are on-screen
- save user's view position in localStorage or something
- rotate posts (capsule colliders)


+ 4
- 0
main.go View File

@ -295,6 +295,10 @@ func setupRoutes(mux *http.ServeMux) {
io.Copy(response, &buffer)
})
mux.HandleFunc("/health", func(response http.ResponseWriter, request *http.Request) {
response.Write([]byte("OK"))
})
mux.HandleFunc("/invite", func(response http.ResponseWriter, request *http.Request) {
author := getAuthor(db, request)


+ 1
- 1
static/app.css View File

@ -297,7 +297,7 @@ textarea {
margin: 0;
padding: 0.5em 1em;
width: 310px;
font-size: 15px;
font-size: 13px;
text-align: center;
}
.invite-code.link input:focus {


Loading…
Cancel
Save