Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.07 KB

README.md

File metadata and controls

30 lines (23 loc) · 1.07 KB

kallisto

Kallisto a web framework based on Julien Schmidts httprouter package and inspired by martini, revel and gin.

It was written for a university project and is not (and probably never will be) ready for use in production environments.

[Documentation] (https://godoc.org/github.com/swengorschewski/kallisto)

Example:

package main

import "gitlab.com/swen/kallisto"

func main() {
   // create a kallisto mux
   k := kallisto.New()

   // register a route for a HTTP GET request
   // the first parameter represents the request url,
   // the second parameter is an internal name for the route,
   // and the last parameter is a controller function that will be called
   // if a request for this route comes in.
   k.GET("/", "index", func(ctx *kallisto.Context, res *kallisto.Response) {
   	res.Text("Hello world!")
   })

   // starts a webserver listening for requests to localhost on port 8080
   k.ListenAndServe("localhost:8080")
}