Skip to content
/ nrg Public

This is a high-performance Golang web routing framework

Notifications You must be signed in to change notification settings

yni9ht/nrg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NRG

nrg(Ni9ht Router Group) is a simple and easy to use router for your web application. It is written in pure Golang and has no dependencies.

Features

  • HTTP Methods
    • add http handler
  • Context
    • GetQuery
    • PostFrom
    • GetBody
    • GetHeader
    • Get
    • JSON
    • HTML
    • File
  • Redirect
  • Router
    • Add Router
    • Static Route
    • Parameter Route
    • Regex Route
    • Group Route
  • Middleware

Quick Start

  1. Installation
go get -u github.com/yni9ht/nrg
  1. Example
package main

import (
  "fmt"
  "github.com/yni9ht/nrg"
)

func main() {
  server := nrg.NewServer()

  server.GET("/ping", func(context *nrg.Context) {
    context.JSON(200, "pong")
  })

  if err := server.Run(); err != nil {
    fmt.Printf("error %+v \n", err)
  }
}

About

This is a high-performance Golang web routing framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages