Compare commits
3 Commits
7ea36d23dd
...
v0.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f231d4b12 | |||
| 68dfd3cadd | |||
| de320db166 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@
|
|||||||
/.idea
|
/.idea
|
||||||
/run.sh
|
/run.sh
|
||||||
/dist
|
/dist
|
||||||
|
/go.work*
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ RUN apt-get update && apt-get upgrade -y
|
|||||||
|
|
||||||
RUN useradd -u 1000 -m user
|
RUN useradd -u 1000 -m user
|
||||||
|
|
||||||
COPY ./gemserve /app/gemserve
|
COPY ./dist/gemserve /app/gemserve
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
3
Makefile
3
Makefile
@@ -19,7 +19,8 @@ test:
|
|||||||
go test ./...
|
go test ./...
|
||||||
|
|
||||||
tidy:
|
tidy:
|
||||||
go mod tidy
|
go work sync
|
||||||
|
#go mod tidy
|
||||||
|
|
||||||
# Format code
|
# Format code
|
||||||
fmt:
|
fmt:
|
||||||
|
|||||||
@@ -18,17 +18,12 @@ make #run tests and build
|
|||||||
Run:
|
Run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
LOG_LEVEL=info \
|
./dist/gemserve
|
||||||
PANIC_ON_UNEXPECTED_ERROR=true \
|
|
||||||
RESPONSE_TIMEOUT=10 \ #seconds
|
|
||||||
ROOT_PATH=./srv \
|
|
||||||
DIR_INDEXING_ENABLED=false \
|
|
||||||
./gemserve 0.0.0.0:1965
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You'll need TLS keys, you can use `certs/generate.sh`
|
You'll need TLS keys, you can use `certs/generate.sh`
|
||||||
for quick generation.
|
for quick generation.
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
- [ ] Make TLS keys path configurable via venv
|
- [ ] Make TLS keys path configurable
|
||||||
- [ ] Fix slowloris (proper response timeouts)
|
- [ ] Fix slowloris (proper response timeouts)
|
||||||
|
|||||||
8
go.mod
8
go.mod
@@ -3,14 +3,10 @@ module gemserve
|
|||||||
go 1.24.3
|
go 1.24.3
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.antanst.com/antanst/logging v0.0.0
|
git.antanst.com/antanst/logging v0.0.1
|
||||||
git.antanst.com/antanst/xerrors v0.0.0
|
git.antanst.com/antanst/xerrors v0.0.1
|
||||||
github.com/gabriel-vasile/mimetype v1.4.8
|
github.com/gabriel-vasile/mimetype v1.4.8
|
||||||
github.com/matoous/go-nanoid/v2 v2.1.0
|
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
|
require golang.org/x/net v0.33.0 // indirect
|
||||||
|
|||||||
Reference in New Issue
Block a user