Skip to content

veera-damisetti/go-web-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Web Server Project

This project implements a simple web server using Go.

Getting Started

To setup a webserver on your system, follow these simple steps:

  1. Clone the repository:

    https://github.com/veera-damisetti/go-web-server.git
    cd go-web-server
  2. Build the Project

    go build main.go
  3. Create a Service Unit File

    sudo vi /etc/systemd/system/v-server.service
    
    [Unit]
    Description=Go Server by Veera
    After=network.target
    
    [Service]
    ExecStart=/bin/bash -c '<path to binary>'
    WorkingDirectory= <path to binary workdir>
    Restart=always
    User=root
    Group=root
    
    [Install]
    WantedBy=multi-user.target
    
  4. Reload systemd

    sudo systemctl daemon-reload
  5. Enable and Start the Service

    sudo systemctl enable v-server
    sudo systemctl start v-server
    
    

-- Note:

  • By defualt webserver will listen on port 8443, you can change the port in main.go file

About

Web server using go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published