Melkeydev / go-blueprint

Go-blueprint allows users to spin up a quick Go project using a popular framework
MIT License
2.07k stars 141 forks source link

Feat [Fiber Framework] ServerHeader and AppName depends of project name #203

Closed H0llyW00dzZ closed 1 month ago

H0llyW00dzZ commented 1 month ago

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Problem/Feature

Add ServerHeader and AppName depends of project name

[!NOTE]
This a cool feature from fiber

Description of Changes:

Example how it work:

$ go-blueprint create --name my-project --framework fiber --driver mysql

 ____  _                       _       _   
|  _ \| |                     (_)     | |  
| |_) | |_   _  ___ _ __  _ __ _ _ __ | |_ 
|  _ <| | | | |/ _ \ '_ \| '__| | '_ \| __|
| |_) | | |_| |  __/ |_) | |  | | | | | |_ 
|____/|_|\__,_|\___| .__/|_|  |_|_| |_|\__|
                   | |
                   |_|

            ..
             Next steps:
                         • cd into the newly created project with: `cd my-project`

$ cd my-project

$ go run cmd/api/main.go

 ┌───────────────────────────────────────────────────┐ 
 │                    my-project                     │ 
 │                   Fiber v2.52.4                   │ 
 │               http://127.0.0.1:8080               │ 
 │       (bound on host 0.0.0.0 and port 8080)       │ 
 │                                                   │ 
 │ Handlers ............. 4  Processes ........... 1 │ 
 │ Prefork ....... Disabled  PID .............. 9732 │ 
 └───────────────────────────────────────────────────┘ 

Checklist

H0llyW00dzZ commented 1 month ago

[!NOTE]
Example how ServerHeader works:

image

briancbarrow commented 1 month ago

Looks good. Thanks @H0llyW00dzZ for submitting the PR.