Skip to content

hhiroshell/cowweb2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COWWEB2

Cowsay Web API version 2. This simple micro API server is powered by Helidon.

$ curl "http://localhost:8080/cowsay/say?say=Hello%20cowweb"
 ______________
< Hello cowweb >
 --------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||--WWW |
                ||     ||

How to build and run

Docker

Build a docker image and run localy.

Install Docker

You need a environment docker is installed. See the official documentation.

Clone this repository.

git clone https://github.com/hhiroshell/cowweb2.git && cd cowweb2

Build and run.

docker build -t cowweb .

[Optional]: You can specify another docker file Dockerfile_native. By this, cowweb will be build as a GraalVM Native Image running inside the docker container.

docker build -t cowweb -f Dockerfile_native .

And then run the container publishing the container’s 8080 port to the host.

docker run -p 80:8080 cowweb

Call the API.

You can call the API via localhost:80 .

curl "http://localhost/cowsay/say"

And you can specify a message using say query (special characters have to be URL encorded).

curl "http://localhost/cowsay/say?say=hello%20cowweb"

About

Cowsay Web API version 2. This simple micro API server is powered by Helidon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published