The GOP Server is an open-source web server for Linux and Windows systems that handles HTTP requests to scripts programmed in Go returning the result of the execution to the client. The software is able to, depending on the requested path, return static files or execute Go scripts, which are compiled on the fly and have specific functionality.

Overview

Golang Preprocessor for Web Services - GOP Server

Introduction

The GOP Server is an open-source web server for Linux and Windows systems that handles HTTP requests to scripts programmed in Go returning the result of the execution to the client.

The software is able to, depending on the requested path, return static files or execute Go scripts, which are compiled on the fly and have specific functionality. This functionality is transparently embedded by the GOP Server into the script files to provide them with functions inherent to web application development such as URL parameter management, cookie management, session management, includes a library of basic functions and database support.

GOP scripts are .gop files coded in Go but that follow the GOP specification, a superset of Go defined to integrate the extra functionality provided by the server.

In summary, the server allows to easily develop web applications programmed in Go with the comfort and functionality analogous to PHP, which makes it a multipurpose tool capable of being used both in educational environments to learn the language and in development and production environments for web applications or HTTP APIs.

Disclaimer

The software has just been released an has to be considered as beta, as might contain bugs and/or security vulnerabilities. Audit the code before using it in production enviroments. The software is provided as is without warranty of any kind.

How to run

The steps are simple: install Golang, clone the repository and execute from source (go run).

Then, place your files under the /public directory and access them from http://localhost:80.

Windows Prerequisites

Install Golang from https://golang.org/doc/install

Clone the repository.

Edit the configuration if needed (config/configuration.json)

Open a terminal inside the GOP-Server folder.

Linux Prerequisites

sudo apt update
sudo apt install golang
git clone https://github.com/i-rme/GOP-Server.git
cd GOP-Server
nano config/configuration.json

Linux

sudo go run src/main.go

Windows

go run src/main.go

WSL

wsl sudo go run src/main.go

Optional Settings

Enable database support by setting MySQLSupportEnabled to true in the config file.

Enable privilege downgrade by setting RunScriptsAsNobody to true in the config file.

Important paths

Configuration file: ./config/configuration.json

Default document root: ./public

Default log directory: ./logs

Default uploads directory: ./private/uploads

CMS Example database details: ./public/examples/cms/components/repository.gop

Troubleshooting

Error: CreateFile src/main.go: The system cannot find the path specified. when launching the GOP Server with go run.

Solution: Navigate to the GOP-Server directory before launching. cd GOP-Server

Error: "no required module provides package" when MySQL support is enabled.

Solution: Install the missing package using go get github.com/go-sql-driver/mysql

Error: "listen tcp 127.0.0.1:80: bind: permission denied" when starting the server on linux.

Solution: Run the server with root privileges sudo go run src/main.go

Architecture

Architecture

Owner
Raúl Martínez (RME)
Find me on Twitter @ RME
Raúl Martínez (RME)
A simple http-web server logging incoming requests to stdout with simple http-interface.

http-cli-echo-logger A simple http-web server logging incoming requests to stdout with simple http-interface. Run locally go run ./cmd/main.go Default

Andrii Bosonchenko 5 Jul 18, 2022
Static Content Web Server

Static Content Web Server The main purpose of the project is to develop static server that can be used with modern javascript frameworks (React, vue.j

Rinat 1 Dec 17, 2021
Opinionated boilerplate Golang HTTP server with CORS, OPA, Prometheus, rate-limiter for API and static website.

Teal.Finance/Server Opinionated boilerplate HTTP server with CORS, OPA, Prometheus, rate-limiter… for API and static website. Origin This library was

teal.finance 7 Mar 26, 2022
A simple Go HTTP server that proxies RPC provider requests

go-rpc-provider-proxy A simple Go HTTP server that proxies RPC provider requests.

Miguel Mota 5 Nov 21, 2021
RoadRunner: an open-source high-performance PHP application server, load balancer, and process manager

RoadRunner is an open-source (MIT licensed) high-performance PHP application server, load balancer, and process manager. It supports running as a serv

Spiral Scout 0 Jan 13, 2022
CasaOS - A simple, easy-to-use, elegant open-source home server system.

CasaOS - A simple, easy-to-use, elegant open-source home server system. CasaOS is an open-source home server system based on the Docker ecosystem and

IceWhale 4.4k Aug 4, 2022
Gin Server Demo, with Features: Swagger UI, Prometheus, Shell scripts

Gin Server Gin Server Features Swagger UI Docker Prometheus Shell generator Production Cypher Service And we can get the authorization key SECURITY_CA

song 0 Nov 1, 2021
A local server with real-time reload function designed for static website preview or development

中文 | English ?? 介绍 reserver 是一款为静态网站预览或开发设计的具有实时重新加载功能的本地服务器。 其主要运用场景为: 单页应用的预览(例如Vue编译之后的项目不可以直接通过file://协议进行访问) 具有ajax请求的页面(因浏览器安全限制,默认禁止file://协议进行

憧憬Licoy 6 Nov 27, 2021
Go web server - A web server that can accept a GET request and serve a response.

go_web_server A web server that can accept a GET request and serve a response. Go is a great language for creating simple yet efficient web servers an

Gilbert Ngeno 0 Jan 3, 2022
A very simple Golang server handling basic GET and POST requests

GOLANG SERVER INTRO As a true Blockchain enthusiast, I had to learn Solidity and Golang to participate to several projects. This repository consists o

null 0 Nov 17, 2021
Flagr is an open source Go service that delivers the right experience to the right entity and monitors the impact.

Flagr is an open source Go service that delivers the right experience to the right entity and monitors the impact. It provides feature flags, experimentation (A/B testing), and dynamic configuration. It has clear swagger REST APIs for flags management and flag evaluation.

null 37 Jul 23, 2022
The Zuri Core is an open-source API that serves as the backend and backbone of Zuri Chat

The Zuri Core is an open-source API that serves as the backend and backbone of Zuri Chat

Zuri Chat 122 Jul 2, 2022
An open-source, on-prem feature flag solution

An open-source, on-prem feature flag solution Documentation | Features | Values | Examples | Enterprise Flipt is an open source, on-prem feature flag

Mark Phelps 1.9k Aug 1, 2022
Go package for the BeagleBone open source hardware

go-beaglebone Go package for the BeagleBone open source hardware Also check out https://github.com/SpaceLeap/go-embedded This package builds on top of

Space Leap 15 Jul 6, 2019
Fishserver is designed to quickly add HTTP handlers to HTTP servers. It supports registration of various HTTP

Fishserver is designed to quickly add HTTP handlers to HTTP servers. It supports registration of various HTTP. Handler interface types such as Gin Engine, Go's built-in HTTP. HandlerFunc, or http.ServeMux. The HTTP server can be configured quickly with options and can be used for test cases.

coolstina 0 Nov 1, 2021
a simple http server as replacement of python -m http.server

ser a simple http server as replacement of python -m http.server

Changkun Ou 4 Feb 16, 2022
A simple HTTP Server to share files over WiFi via Qr Code

go-fileserver A simple HTTP server to share files over WiFi via QRCode Installation You can download compressed version from

Pradeep Khileri 69 May 30, 2022
Formrecevr is a simple and lightweight from receiver backend primarily designed for (but not limited to) static websites.

Formrecevr Formrecevr (pronunced "Form receiver") is a simple and lightweight from receiver backend primarily designed for (but not limited to) static

Dorian Zedler 2 Apr 17, 2022
Fileserver: A simple static fileserver

Fileserver A simple static fileserver. Serves requests to local files in a directory of your choosing so that you can preview files in your browser. B

Liam Egan 1 May 26, 2022