Β
Β
Β 
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
- Create a new project:
cgapp create
- 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.