Compare commits

...

3 Commits

Author SHA1 Message Date
2f231d4b12 Update Dockerfile 2025-05-26 16:51:01 +03:00
68dfd3cadd Update README.md 2025-05-26 16:50:26 +03:00
de320db166 Add go workspace. 2025-05-26 16:46:38 +03:00
5 changed files with 8 additions and 15 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@
/.idea
/run.sh
/dist
/go.work*

View File

@@ -4,7 +4,7 @@ RUN apt-get update && apt-get upgrade -y
RUN useradd -u 1000 -m user
COPY ./gemserve /app/gemserve
COPY ./dist/gemserve /app/gemserve
WORKDIR /app

View File

@@ -19,7 +19,8 @@ test:
go test ./...
tidy:
go mod tidy
go work sync
#go mod tidy
# Format code
fmt:

View File

@@ -18,17 +18,12 @@ make #run tests and build
Run:
```shell
LOG_LEVEL=info \
PANIC_ON_UNEXPECTED_ERROR=true \
RESPONSE_TIMEOUT=10 \ #seconds
ROOT_PATH=./srv \
DIR_INDEXING_ENABLED=false \
./gemserve 0.0.0.0:1965
./dist/gemserve
```
You'll need TLS keys, you can use `certs/generate.sh`
for quick generation.
## TODO
- [ ] Make TLS keys path configurable via venv
- [ ] Make TLS keys path configurable
- [ ] Fix slowloris (proper response timeouts)

8
go.mod
View File

@@ -3,14 +3,10 @@ module gemserve
go 1.24.3
require (
git.antanst.com/antanst/logging v0.0.0
git.antanst.com/antanst/xerrors v0.0.0
git.antanst.com/antanst/logging v0.0.1
git.antanst.com/antanst/xerrors v0.0.1
github.com/gabriel-vasile/mimetype v1.4.8
github.com/matoous/go-nanoid/v2 v2.1.0
)
replace git.antanst.com/antanst/xerrors => ../xerrors
replace git.antanst.com/antanst/logging => ../logging
require golang.org/x/net v0.33.0 // indirect