[go: up one dir, main page]

Skip to content

Example of preparing the environment for Ubuntu Server#

Updating the system#

Update the system:

sudo apt update
sudo apt upgrade -y

Firewall#

Set up the firewall:

Allow the SSH connection:

sudo ufw allow ssh

Base rules:

sudo ufw default deny incoming
sudo ufw default allow outgoing

Allow HTTP and HTTPS connections:

sudo ufw allow http
sudo ufw allow https

Enable the firewall:

sudo ufw enable

Installation#

Do not forget to create a module:

go mod init example

Installation:

go get github.com/green-api/whatsapp-api-webhook-server-golang

Examples#

Download and run our web server as an example:

Download Example:

wget https://raw.githubusercontent.com/green-api/whatsapp-api-webhook-server-golang/master/examples/main.go

Running the application:

go run main.go