Skip to content

tcarvi/tserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tserver

Minimum Server written in golang

Structure of Directories:

  • Golang Server:
    • [server_root] / go / src / github.com / [Your_Github_User] / tserver / main.go
  • Webapp files:

Container and/or Virtual machine configurations:

  • You must have golang tools installed
  • $GOPATH must be set to [server_root]/go
  • $GOBIN must be set to $GOPATH/bin
  • $GOBIN must be in your PATH variable
  • Example of commands:
# Golang workspace variables  
export GOPATH=[server_root]/go
export GOBIN=$GOPATH/bin

# Path for golang development tools
# Verify if /usr/go/bin is set. If not, add it.
export PATH=/usr/local/go/bin:$PATH
# Make your golang projects to be executed outside its src directory.
export PATH=$GOBIN:$PATH

Server Initialization:

  • Go to tserver.go directory
  • Execute: go install
  • Inside the root of the webapp directory, execute: $ tserver

Test on localhost:

  • Add a line for your [hostname], in your hosts file (/etc/hosts in linux):
127.0.0.1           localhost
::1                 localhost
[hostname].com      localhost:8080

About

Minimum Server written in golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages