Code Monkey home page Code Monkey logo

faster's Introduction

Faster (just gofiber)

Welcome to the Faster (just gofiber) project!

This project extends the gofiber framework to allow for prefixless groups. This can be useful for separating different parts of your application and making your routes more organized and easier to read.

To use this extension, you will need to have gofiber installed in your project. Simply import the extension and use the Group function as you would normally use it in gofiber, but without specifying a prefix. The routes within the group will automatically be nested under the parent group.

Here is an example of how to use the prefixless group extension:

package main

import (
	"github.com/yaameen/faster"
)

func main() {
	app := faster.New()

    prefixed = app.Prefix("app")
    prefixed.Get("/", info)
	// Create a prefixless group
	v1 := app.Group()
	{
		v1.Get("/", listUsers)
		v1.Get("/:id", getUser)
		v1.Post("/", createUser)
		v1.Put("/:id", updateUser)
		v1.Delete("/:id", deleteUser)
	}

	app.Listen(3000)
}

This will create the following routes:

  • GET /app
  • GET /
  • GET /:id
  • POST /
  • PUT /:id
  • DELETE /:id

I hope this extension helps make your gofiber projects more organized and easier to maintain. If you have any questions or issues, feel free to open an issue on the GitHub repository.

faster's People

Contributors

yaameen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.