net_http-go-template

command module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 1 Imported by: 0

README ΒΆ

net/http backend template for Create Go App CLI

go versionΒ go coverΒ go reportΒ license

Package net provides a portable interface for network I/O, including TCP/IP, UDP, domain name resolution, and Unix domain sockets. Although the package provides access to low-level networking primitives.

Package net/http provides HTTP client and server implementations.

⚑️ Quick start

  1. Create a new project:
cgapp create
  1. Run project by this command:
make run

βœ… Used packages

πŸ—„ Template structure

.
β”œβ”€β”€ .dockerignore
β”œβ”€β”€ .editorconfig
β”œβ”€β”€ .gitignore
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ Makefile
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
β”œβ”€β”€ 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
        β”œβ”€β”€ utils.go
        └── utils_test.go

4 directories, 17 files

βš™οΈ Configuration

# ./configs/apiserver.yml

# Server config
server:
  host: 0.0.0.0
  port: 5000

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

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

⚠️ License

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

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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