Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/feed-rss2.php on line 8
Using Tango on Ubuntu 14.04 – AKLWEB HOST LLC Support Center https://support.aklwebhost.com Sat, 18 Jan 2020 21:41:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 Using Tango on Ubuntu 14.04 https://support.aklwebhost.com/knowledgebase/using-tango-on-ubuntu-14-04/ https://support.aklwebhost.com/knowledgebase/using-tango-on-ubuntu-14-04/#respond Sat, 18 Jan 2020 21:40:12 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=3039 Tango is a micro and pluggable web framework built with Golang. It has powerful routing and flexible route combinations, dependency injection embedded, and allows direct integration with existing services. This article will show you how to install and use Tango on Ubuntu 14.04.

If you do not have Golang installed, install Golang using the directions in this article. This may also work on other distros but results will vary.

Install Dependencies

You can skip this step if you have already installed the version controls. Golang will require you to install gitbzr, and/or mercurial. This may be needed if you are downloading libraries from a version control system that is using one of those protocols.

apt-get update
apt-get dist-upgrade -y
apt-get install git bzr mercurial -y

Once everything is installed, you can proceed to the next step.

Install Tango

To install Tango, run the following command:

go get github.com/lunny/tango

If everything went well, you can proceed to the next step. If there was an error, verify your GOPATH by running go env and checking its path. If your project is outside of the GOPATH, and you get a warning about it, you can safely ignore it.

Using Tango

To use Tango, create a file called server.go and populate it with the following lines of code:

package main

import (
  "github.com/lunny/tango"
)

func main() {
t := tango.Classic()
    t.Get("/", func() string {
    return "Hello from AKLWEB HOST Server!"
    })
t.Run()
}

Afterwards, run go run server.go.

Switch over to your web browser and type http://[SERVER_IP]:8000/. Replace [SERVER_IP] with the IP address of your VPS.

If your installation was successful, you will see “Hello from AKLWEB HOST Server!” in your browser.

]]>
https://support.aklwebhost.com/knowledgebase/using-tango-on-ubuntu-14-04/feed/ 0