Skip to content

Library for running golang and php (cgi) in a single port/service/server!

Notifications You must be signed in to change notification settings

AnikHasibul/gocgi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

gocgi

usage:

import (
    "net/http"
    "github.com/anikhasibul/gocgi"
)

func main() {    
    http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) {
    	gocgi.CGIfy(w, r, "php-cgi", "./server.php")
    })
    http.ListenAndServe(":8080", nil)
}

server.php:

<?php
echo "Hello, {$_GET['name']}";

visit: http://localhost:8080/?name=World

Hello, World

About

Library for running golang and php (cgi) in a single port/service/server!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages