https://github.com/samuelesabella/cowserve
serve cowsay messages over http and https
https://github.com/samuelesabella/cowserve
container cowsay docker docker-image http http-server https https-server nodejs simple testing web-server
Last synced: 3 months ago
JSON representation
serve cowsay messages over http and https
- Host: GitHub
- URL: https://github.com/samuelesabella/cowserve
- Owner: samuelesabella
- License: lgpl-3.0
- Created: 2019-10-06T19:13:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-13T18:36:37.000Z (almost 6 years ago)
- Last Synced: 2025-02-09T13:15:03.603Z (8 months ago)
- Topics: container, cowsay, docker, docker-image, http, http-server, https, https-server, nodejs, simple, testing, web-server
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# COWSERVE
Serve cowsay messages over http and https
### Usage
Serve a cowsay message over https on localhost:4443
```
$ docker run -it -d -p 4443:8080 sabellas/cowserve
$ curl -k http://localhost:4443/
____________________________
< Cowserve by samuelesabella >
----------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
```
Cowsay messages are set using the request path (e.g. retrieving *https://localhost/abc* will return a cowsay "abc" message).
**cowserve** supports default messages by specifiying the environment variable *msg*
```
$ docker run -it -p 4443:8080 --rm -e msg="Hello, cowsay!" sabellas/cowserve
```
The container also supports http by setting the *::http::* tag inside the default message
```
$ docker run -it -p 80:8080 --rm -e msg="::http:: Hello, http cowsay!" sabellas/cowserve
```
### Build the image
```
$ sudo docker build . -t sabellas/cowserve
```