To access a Gliim service on the web, you need to have a web server or load balancer (think Apache, Nginx, HAProxy etc.).
This assumes you have completed the Hello World as a Service, with a service built and tested via command line.
In this example, Nginx web server is used; edit its configuration file. For Ubuntu and similar:
sudo vi /etc/nginx/sites-enabled/defaultCopied!
while on Fedora and other systems it might be:
sudo vi /etc/nginx/nginx.confCopied!
Add the following in the "server {}" section:
location /hello/ { include /etc/nginx/fastcgi_params; fastcgi_pass unix:///var/lib/gg/hello/sock/sock; }Copied!
"hello" refers to your Hello World application. Finally, restart Nginx:
sudo systemctl restart nginxCopied!
Now you can call your web service, from the web. In this case it's probably a local server (127.0.0.1) if you're doing this on your own computer. The URL would be:
http://127.0.0.1/hello/hello-world/name=MikeCopied!
Note the URL request structure: first comes the application path ("/hello") followed by request path ("/hello-world") followed by URL parameters ("/name=Mike"). The result: