Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MrAndreID / Go Website (Web)

License: MIT

The MrAndreID/GoWeb is a skeleton uses the Go Programming Language (GoLang) with The Echo Framework for The Frontend that renders a Server-Side Rendered (SSR) Website.

Table of Contents

Requirements

To use The MrAndreID/GoWeb, you must ensure that you meet the following requirements:

  • Go >= 1.27

Installation

To use The MrAndreID/GoWeb, you must follow the steps below:

  • Clone a Repository
# git clone https://github.com/MrAndreID/goweb.git
  • Get Dependancies
# go mod download
# go mod tidy
  • Create .env file from .env.example (Linux)
# cp .env.example .env
  • Configuring .env file

Unit Test

To Run Unit Test for The MrAndreID/GoWeb, you must ensure that you meet the following requirements:

  • Prepare a stub or mock of the Backend for the repository layer
  • Run Unit Test for The MrAndreID/GoWeb
# go test -v -cover -coverpkg=./internal/feature/... ./internal/feature/... -count=1
  • Run Unit Test for The MrAndreID/GoWeb with Coverage Profile
# go test -v -cover -coverpkg=./internal/feature/... -coverprofile=coverage.out ./internal/feature/... -count=1
# go tool cover -func=coverage.out

Usage

To use The MrAndreID/GoWeb, you must ensure that you meet the following requirements:

  • Directory Structure The MrAndreID/GoWeb
Name Description
cmd/web Entry Point for The Application
internal/application Initialization of Echo Framework, Middleware, Renderer, and Routes.
internal/application/config Configuration from Env File
internal/entity Shared Struct Data (incl. Backend Response Envelope)
internal/feature/user User Feature (SSR Pages under /users)
internal/feature/user/templates HTML Templates for The User Feature
storage Folder for Add Maintenance Flag File
storage/log Folder for Log File
  • Run The MrAndreID/GoWeb
# go run ./cmd/web
  • Run The MrAndreID/GoWeb with Docker
# docker build --no-cache -t goweb:1.0.0 .
# docker run --name goweb --restart=always -d -p 10101:10101 -v /path/to/.env:/app/.env:ro -v /path/to/folder:/app/storage goweb:1.0.0
  • Set The MrAndreID/GoWeb to Maintenance Mode in Storage Folder
# touch storage/maintenance.flag

Versioning

I use Semanting Versioning. For the versions available, see the tags on this repository.

Authors

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

Official Documentation for Go Language

Documentation for Go Language can be found on the Go Package website.

License

The MrAndreID/GoWeb is released under the MIT License. See the LICENSE file for more information.

About

A skeleton uses the Go Programming Language (GoLang) with The Echo Framework for Website Development.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages