httpme 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +47 -3
- data/lib/httpme/command.rb +5 -5
- data/lib/httpme/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c94093368973d549362e255fadfa0f652dae29a25471359fbb6b94e3821032e9
|
4
|
+
data.tar.gz: a748cfadba0cd3f2ce156fbdcbff8c13a226ce97bc9600dbea9e2e5d38fd5273
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb588a5338bc93d6178f72b90ab4b5a75ed04abd10d0551d1d4fe6d07ca09ce77273bbaf69dee217928f9da3b8bdb5a6e95b2e410adb5c666926b9ebf428445a
|
7
|
+
data.tar.gz: c6e07f6abfbd20f504047ba5039b04e12d188eb1e4fbe3d089a6f6a4dfd1f8ee02a7650f14a34d0b9643b3717298d8e9f44245d16f5396ee44a1591139306b27
|
data/README.md
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
-
#
|
1
|
+
# httpme - static web server with basic authentication
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/httpme.svg)](https://badge.fury.io/rb/httpme)
|
4
4
|
[![Build Status](https://github.com/DannyBen/httpme/workflows/Test/badge.svg)](https://github.com/DannyBen/victor/actions?query=workflow%3ATest)
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/6626f32d6a99288dcc98/maintainability)](https://codeclimate.com/github/DannyBen/httpme/maintainability)
|
5
6
|
|
6
7
|
---
|
7
8
|
|
8
|
-
|
9
|
+
httpme is a command line utility for serving static HTMLs and other files
|
10
|
+
with optional basic authentication support.
|
9
11
|
|
10
12
|
---
|
11
13
|
|
@@ -13,10 +15,43 @@ Static files web server with basic authentication.
|
|
13
15
|
|
14
16
|
$ gem install httpme
|
15
17
|
|
16
|
-
##
|
18
|
+
## Docker
|
19
|
+
|
20
|
+
Start the web server and mount the current directory:
|
21
|
+
|
22
|
+
```shell
|
23
|
+
$ docker run --rm -it -p 3000:3000 -v $PWD:/docroot dannyben/httpme
|
24
|
+
```
|
17
25
|
|
26
|
+
Or, with basic authentication
|
18
27
|
|
19
28
|
```shell
|
29
|
+
$ export HTTPME_AUTH=user:password
|
30
|
+
$ docker run --rm -it -p 3000:3000 -v $PWD:/docroot \
|
31
|
+
-e HTTPME_AUTH dannyben/httpme
|
32
|
+
```
|
33
|
+
|
34
|
+
Or, with docker-compose:
|
35
|
+
|
36
|
+
```yaml
|
37
|
+
version: '3'
|
38
|
+
|
39
|
+
services:
|
40
|
+
web:
|
41
|
+
build: .
|
42
|
+
image: dannyben/httpme
|
43
|
+
volumes: [".:/docroot"]
|
44
|
+
ports: ["3000:3000"]
|
45
|
+
environment:
|
46
|
+
HTTPME_AUTH:
|
47
|
+
```
|
48
|
+
|
49
|
+
## Usage
|
50
|
+
|
51
|
+
|
52
|
+
```
|
53
|
+
$ httpme --help
|
54
|
+
|
20
55
|
httpme - static web server with basic authentication
|
21
56
|
|
22
57
|
Options can be set using command line arguments or environment variables
|
@@ -61,3 +96,12 @@ Examples:
|
|
61
96
|
HTTPME_AUTH=admin:s3cr3t httpme docs # same result as above
|
62
97
|
```
|
63
98
|
|
99
|
+
Contributing / Support
|
100
|
+
--------------------------------------------------
|
101
|
+
|
102
|
+
If you experience any issue, have a question or a suggestion, or if you wish
|
103
|
+
to contribute, feel free to [open an issue][issues].
|
104
|
+
|
105
|
+
---
|
106
|
+
|
107
|
+
[issues]: https://github.com/DannyBen/httpme/issues
|
data/lib/httpme/command.rb
CHANGED
@@ -17,12 +17,12 @@ module HTTPMe
|
|
17
17
|
option "-o, --host HOST", "Server host (default: 0.0.0.0)"
|
18
18
|
option "-a, --auth AUTH", "Specify user:password to enable basic authentication"
|
19
19
|
|
20
|
-
environment 'HTTPME_PATH', "Same as
|
21
|
-
environment 'HTTPME_AUTH', "Same as --auth"
|
22
|
-
environment 'HTTPME_PORT', "Same as --port"
|
23
|
-
environment 'HTTPME_HOST', "Same as --host"
|
20
|
+
environment 'HTTPME_PATH', "Same as the PATH argument"
|
21
|
+
environment 'HTTPME_AUTH', "Same as the --auth option"
|
22
|
+
environment 'HTTPME_PORT', "Same as the --port option"
|
23
|
+
environment 'HTTPME_HOST', "Same as the --host option"
|
24
24
|
|
25
|
-
example "httpme -p
|
25
|
+
example "httpme -p 4000"
|
26
26
|
example "httpme docs --auth admin:s3cr3t"
|
27
27
|
example "HTTPME_AUTH=admin:s3cr3t httpme docs # same result as above"
|
28
28
|
|
data/lib/httpme/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mister_bin
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
103
|
+
rubygems_version: 3.1.4
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Static files web server with basic authentication
|