Skip to content
This repository was archived by the owner on Sep 23, 2021. It is now read-only.

Commit cb7ee99

Browse files
committed
Update readme with basic auth
1 parent e7112ad commit cb7ee99

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Readme.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This repo is a reworked version of [Sandstorm Hacker Slides](https://github.com/
1616
- Pdf print
1717
- [Demo version](https://murmuring-sierra-54081.herokuapp.com)
1818
- Tiny 10 Mb docker image
19+
- Optional Basic auth
1920

2021

2122
| Edit mode | Published |
@@ -45,9 +46,23 @@ And then you can just open [http://127.0.0.1:8080](http://127.0.0.1:8080) and it
4546
Run with docker
4647

4748
```shell
48-
docker run -it -p 8080:8080 -v $(pwd)/slides:/app/slides msoedov/hacker-slides
49+
docker run -it -p 8080:8080 -v $(pwd)/slides:/app/slides msoedov/hacker-slides
4950
```
5051

52+
Basic auth (disabled by default)
53+
```shell
54+
USER=bob PASSWORD=password1 go run main.go
55+
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
56+
- using env: export GIN_MODE=release
57+
- using code: gin.SetMode(gin.ReleaseMode)
58+
59+
WARN[0000] Auth mode enabled
60+
WARN[0000] Visit http://bob:password1@0.0.0.0:8080
61+
```
62+
63+
```shell
64+
docker run -it -p 8080:8080 -e USER=bob -e PASSWORD=password1 -v $(pwd)/slides:/app/slides msoedov/hacker-slides
65+
```
5166

5267
Getting Help
5368
------------

0 commit comments

Comments
 (0)