Skip to content

GoRoot it's a golang module or micro-framework for the backend development.

License

Notifications You must be signed in to change notification settings

rootspyro/goroot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoRoot

GitHub tag (latest by date) GitHub go.mod Go version (subdirectory of monorepo)

GoRoot it's a golang module or micro-framework for the backend development.

Features

GoRoot is fully developed with golang standard libraries and supports functionalities such as:

  • Responses:

    • Plain Text
    • Json
    • Html rendering
    • Static files
  • Dynamic Routing

  • Middlewares management

  • Cors policy configuration

  • Server configuration

  • Http request logger

Quick Start

Start your project with GoRoot

go mod init ${project_name}
go get -u "github.com/rootspyro/goroot"

Now open the main.go file in your code editor and type the following code.

// main.go
package main

import "github.com/rootspyro/goroot"

func main() {

    // Create a new server
	server := goroot.New(goroot.Config{})

    // Create 
	server.Get("/", func(root *goroot.Root) {
		root.OK().Send("Hello World")
	})
    
    // default port 3000
	server.Listen()
}

Finally run your main.go and you're done!

go run main.go

You have created a web server with GoRoot.

Follow the Documentation to keep learning!.

License

MIT

Authors

About

GoRoot it's a golang module or micro-framework for the backend development.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages