Git Product home page Git Product logo

docs's Introduction

Website

This website is built using Docusaurus 2, a modern static website generator.

Installation

$ yarn

Local Development

$ yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Using SSH:

$ USE_SSH=true yarn deploy

Not using SSH:

$ GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.

docs's People

Contributors

abhi12299 avatar ajf-sa avatar akshaybabloo avatar ansidev avatar codemicro avatar dependabot[bot] avatar efectn avatar fenny avatar github-actions[bot] avatar hi019 avatar jfcg avatar jozsefsallai avatar kiyonlin avatar koddr avatar leonklingele avatar li-jin-gou avatar marcmartin13 avatar mlukasik-dev avatar mt-gitlocalize avatar namangangwar avatar narven avatar olongfen avatar rantignac avatar renewerner87 avatar rockcreation7 avatar scrip7 avatar sixcolors avatar sujit-baniya avatar thomasvvugt avatar vecpeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

We need create doc to guide constants on Fiber

Any suggestion?

I thought something like that

explain possibles constants to use on Fiber
fiber.<constant>

e.g
fiber.StatusInternalServerError // get status errors 500 respect RFC XYZ all list to use Status Code can you based on IANA


list constants: we can show as a table
show list below

Logger middleware does not work as expectation

Config

app.Use(logger.New(logger.Config{
	Format:     "[${pid}]:${port} ${status} - ${method} ${path}\n",
	TimeFormat: "2006-01-02T15:04:05.0Z",
	TimeZone:   "Asia/Ho_Chi_Minh",
}))

Output

2021-11-12T09:29:26.4Z | 200 |      0s |       127.0.0.1 | GET     | /hello

Config

app.Use(logger.New(logger.Config{
        Format:     "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))

Output

09:44:28 | 200 |      0s |       127.0.0.1 | GET     | /hello

I think this is a bug! Did I miss something?

Incorrect usage of `Location`

The example provided for ctx.Location here indicates that Location doesn't have a return value in its signature, however in the code below c.Location("/test") is returned. This code fails to compile.

`Ctx.Locals()` method signature incorrect

The type signature of Ctx.Locals() according to the docs:

func (c *Ctx) Locals(key string, value ...interface{}) interface{}

Looks like this method signature was updated as of v2.40.0 to accept a key interface:

gofiber/fiber@ff46029

func (c *Ctx) Locals(key interface{}, value ...interface{}) (val interface{})

Session error with redis session

I use redis as session middleware service. But get error when reload page or open a new page if my script get session info

Here is the error alert: [session] Register this type first with the `RegisterType` method.

This error also happen when restart server

I have to restart server, clear history, restart redis to continue working

group by params

Hi evereyone can we have example in grouping.md that show we can group router by params
something like this or example more simple

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

  api := app.Group("/api")      // /api

  v1 := api.Group("/v1")        // /api/v1
  user := api.Group("/user")
  userID := user .Group("/:userID")
  v1.Get("/list", handler)      // /api/v1/list
  user.Get("/", handler)      // /api/v1/user
  userID.Get("/profile",handler) // /api/v1/user/1/profile
  userID.Put("/update",handler) // /api/v1/user/1/update

  log.Fatal(app.Listen(":3000"))
}

Spanish Translation

Hello. Should I create a new branch "es" and create a pull request for it?

Redirect with full url

app.Get("/", func(c *fiber.Ctx) {
  c.Redirect("/foo/bar")
  c.Redirect("../login")
  c.Redirect("http://example.com")
  c.Redirect("http://example.com", 301)
})

Does it has to be either host or path-only? Can it be host + path?

I tried c.Redirect("http://10.xx.xx.xx:3000/login") but got

Oops!
404 Not Found
Sorry, an error has occured, Requested page not found!

Visiting that url directly within my browser OK.

Is the problem of host + path, or host + path + port?

Thx!

Tutorial(s) or Blog(s)

There is a lack of tutorials for new users. There are guides to certain things(recipes) and example projects but they don't cover new starters.

A lot of other projects rely on having tutorials/guides on how to use it on 3rd party websites which might be deleted or be behind it's own paywall. Having a blog/tutorial created by the fiber team would ensure high quality as each maintainer is aware of why the code works in the way it does to better assist newer developers and increase adoption of Fiber.

In my opinion what I would like to see as part of a series:

  • How to create and setup your go project for fiber - directory structure, commands to run from start to hello world
  • Creating a configuration system(helpful if you are making a whole tutorial anyway as part of a base) - yml/json/env files or other environment stores
  • Creating a basic hello world api implementing each part of Routing/ Grouping/ Some templates/ Error handling/ Validation/ Hooks
  • Tests - Expanding (app.Test())[https://docs.gofiber.io/api/app#test] and the (Unit Test recipe)[https://github.com/gofiber/recipes/tree/master/unit-test] into it's own section for Testing and Benchmarking
  • Using the "Make Fiber Faster"
  • Benchmarking the project - Steps to benchmark it

Incorrect validation example for `bool` type

Ref. https://github.com/gofiber/docs/blob/master/guide/validation.md?plain=1#L22
Validation will fail when the passed is_active value is false

Like they say in this issue response:

required -under the hood checks if the value of the field is the default value of the datatype; in this case of a bool false.

type bool will always be populated and so required doesn't make sense. Now having said that, you may be looking to validate that the JSON set the bool, then there are things you can do.

change the type to *bool and now the type is a pointer, and it's default value is nil and so required will work as most people expect if the data wasn't in the JSON.

I'm providing a fix to the documentation πŸ˜‰

Redundant files in this repo

For example, there is a benchmarks.md file in the following three dirs of this repo:

  • extra
  • guide
  • original

Why is that? Can two of them be cleaned up?

Portuguese flag on README

The Portuguese translation seems to be in Brazilian Portuguese so it would make more sense to change the flag to a Brazilian one.

With this change, the flag would also match with the one shown in the translation platform.

If you guys agree, I'd be willing to make a PR for it.

πŸš€ [Feature]: Document usage of Fiber Utils

Feature Description

I have been using Fiber for over 2 months now, and everyday I find myself re-inventing the wheel because I didnt know Fiber had a Util function for doing X task.

It would be very beneficial if basic documentation could be added to document all the very useful Fiber Utils.

Additional Context (optional)

No response

Code Snippet (optional)

No response

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests may be closed without explanation.

IDEA: A small logo (square-like)

I had an idea to create a small, square form factor, logo of Fiber.
I was thinking about having the three identifiable blue stripes and maybe the letter F.
This logo could be useful for i.e. favicons and icons or avatars.
Let me know what you thing about this idea!

dark mode/theme

please can you add an option or toggle for readers to be able to see the documentation with a dark mode/theme colours.

πŸ€” Docusaurus Migration for Fiber Docs

Docusaurus 2 is fast, flexible and free documentation generator. I think it would be better if we use Docusaurus instead of Gitbook. Gitbook isn't open source and a bit slow in mobile devices. Check out https://docusaurus.io/. I think we can use it by closing homepage, blog features.

What do you think?

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.