An open API service indexing awesome lists of open source software.

https://github.com/rootspyro/goroot

GoRoot it's a golang module or micro-framework for the backend development.
https://github.com/rootspyro/goroot

backend framework go golang webdevelopment

Last synced: 9 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# GoRoot
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/rootspyro/goroot?label=version&style=for-the-badge)
![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/rootspyro/goroot?style=for-the-badge)

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

```bash
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.
```golang
// 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!

```bash
go run main.go
```

You have created a web server with GoRoot.

Follow the [Documentation](docs/README.md) to keep learning!.

## License

[MIT](https://choosealicense.com/licenses/mit/)

## Authors

- [@rootspyro](https://www.github.com/rootspyro)