Skip to content

kirisakow/api-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WARNING This library is still under development and intended for experimental purposes only.

This is a REST API implementation of a Go function which cleans any given URL of junk query parameters

Examples (live)

Installation on a latest Ubuntu Linux server

1. Download, compile and run

git clone ...

cd api-go

go build .

# run as a transient systemd service
sudo systemd-run --uid=myuser --gid=myuser --same-dir --unit=api-go_$(date +%Y%m%d_%H%M%S)_myuser /home/myuser/api-go/url_clean --port $PORT_NUM_AS_ENV_VAR

2. Configure Nginx as reverse proxy, typically:

server {
   server_name ${DOMAIN_NAME_AS_ENV_VAR};

   location ~ ^/(endpoint|another_endpoint|yet_another) {
       proxy_pass http://localhost:${PORT_NUM_AS_ENV_VAR};
   }

   #
   # ...TLS / SSL / HTTPS / LetsEncrypt / certbot stuff...
   #

}
server {
   #
   # ...TLS / SSL / HTTPS / LetsEncrypt / certbot stuff...
   #
}

3. Test Nginx configuration and, if valid, restart Nginx service:

sudo nginx -t && sudo systemctl restart nginx.service

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages