fiber-go-template

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2020 License: MIT

README ΒΆ

Fiber logo
Fiber backend template
for Create Go App

⚑️ Quick start guide

  1. Create a new app with this template by Create Go App CLI:
cgapp -p ./my-app -b fiber
  1. Go to the ./my-app folder
  2. Run app by command:
task -s

☝️ Please note: we're using Taskfile as task manager by default.

β˜•οΈ Description

Fiber is an Express inspired web framework build on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind.

People switching from Node.js to Go often end up in a bad learning curve to start building their webapps, this project is meant to ease things up for fast development, but with zero memory allocation and performance in mind.

πŸ“š Documentation

πŸ“Œ Requirements

  • Go v1.11+
  • Docker v19.x

βœ… Used packages

πŸ—„ Template structure

.
β”œβ”€β”€ .dockerignore
β”œβ”€β”€ .editorconfig
β”œβ”€β”€ .gitignore
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ Taskfile.yml
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
β”œβ”€β”€ cmd
β”‚   └── apiserver
β”‚       └── main.go
β”œβ”€β”€ configs
β”‚   └── apiserver.yml
β”œβ”€β”€ static
β”‚   └── index.html
└── pkg
    └── apiserver
        β”œβ”€β”€ config.go
        β”œβ”€β”€ config_test.go
        β”œβ”€β”€ error_checker.go
        β”œβ”€β”€ error_checker_test.go
        β”œβ”€β”€ new_server.go
        β”œβ”€β”€ new_server_test.go
        └── routes.go

6 directories, 17 files

βš™οΈ Configuration

# ./configs/apiserver.yml

# Server config
server:
  host: 127.0.0.1
  port: 8080

# Database config
database:
  host: 127.0.0.1
  port: 5432
  username: postgres
  password: 1234

# Static files config
static:
  prefix: /public
  path: ./static

⚠️ License

MIT Β© Vic ShΓ³stak & True web artisans.

Directories ΒΆ

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL