trial-fiber

command module
v0.0.0-...-0e0598e Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 8 Imported by: 0

README

trial-fiber

Template Fiber framework project for fast prototyping, trial, or micro-service unit usage.

Make sure that you have Golang installed already.

[Optional] Setup Mirror for Mainland China

You can skip this one if not approaching the internet from within mainland China.

go env -w GOPROXY=https://goproxy.io,direct # Official
go env -w GOPROXY=https://goproxy.cn,direct # QiniuCloud/七牛云

go env GOPROXY # Double check

Usage

# Create .env file
cp .env.sample .env # specify database connection info

# Install dependencies
go get

# [Optional] Update dependencies
go get -u
go mod tidy

# Run
## With live-reloading (air)
go install github.com/air-verse/air@latest # This line only needs to be run once
air

## Without live-reloading
go run .

# Compile
go build

Deploy with docker

docker build . -t trial-fiber:latest

docker stop trial-fiber && \
docker rm trial-fiber && \
docker run --name trial-fiber -p 3000:3000 -d --restart always --net=host trial-fiber:latest

References/Credits

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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