Code Monkey home page Code Monkey logo

gowebserver's Introduction

GoWebserver

A webserver (somewhat similar to my Python webserver, but with less features and with better performance) written in Go/GoLang (It's even my first project written in Go/GoLang). That supports HTTP and HTTPS, to host a website on your device or local network.

Instructions

Run the server with 'go run main.go' or 'go build -o <output_filename> main.go'. And it will configure the server from the configuration data.

Configuration

The server would run from reading the 'server_config.json' file. It would configure and bind the server from what's configured on the configuration file.

  • "use_global_ip": Set to true or false, if you want the server to listen on all interfaces (localhost, lan, etc.).
  • "server_ip": Specify an IP address (localhost or the IP address of your device) to bind the server with [Required if 'use_global_ip' is set to false].
  • "server_port": Specify a port number for the server to bind to [Required].
  • "server_protocol": Specify 'HTTP' or 'HTTPS' [Required].
  • "https_cert": Specify the filename of the HTTPS certificate [Required if using HTTPS].
  • "https_key": Specify the filename of the HTTPS key [Required if using HTTPS].
  • "html_doc": Specify the filename of an HTML Docuement to load [Not Recquired, if the main HTML document is named 'index.html'].

gowebserver's People

Contributors

pyp2205 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.