Mirror

Vova Tkach f9e4449ffb Assets version++ 5 years ago
assets 118d19a771 Fix image uploads form 5 years ago
consts f9e4449ffb Assets version++ 5 years ago
cypress de214f38d9 Review and fix Cypress tests 5 years ago
domains 287cfa76cf Feature/domain binding (#3) 6 years ago
engine c6722f64dd Shop API 5 years ago
hosts d5576e788e Shop theme 5 years ago
logger 67e2bd5344 DB connection lifetime++, client IP in logs by proxy server headers, user agent in logs 5 years ago
modules 118d19a771 Fix image uploads form 5 years ago
support 1a4d711e41 Shop product images table 5 years ago
utils 5c1a3714d6 Shop basic front-end template theme 5 years ago
vendor 67e2bd5344 DB connection lifetime++, client IP in logs by proxy server headers, user agent in logs 5 years ago
.gitignore af0bc70b44 Shop product image upload action 5 years ago
Dockerfile 7fc4a40686 Version++ 5 years ago
LICENSE c391c57bd1 Update LICENSE 6 years ago
Makefile 7fc4a40686 Version++ 5 years ago
README.md fe892e9709 Update README.md 5 years ago
cypress.json 3ecbf837d9 Cypress must always record video of tests 5 years ago
go.mod 67e2bd5344 DB connection lifetime++, client IP in logs by proxy server headers, user agent in logs 5 years ago
go.sum 67e2bd5344 DB connection lifetime++, client IP in logs by proxy server headers, user agent in logs 5 years ago
main.go 5741f8ab58 Database migration fixes 5 years ago
package.json 772539cc18 Upgrade Cypress engine 5 years ago
session.go ed9edb1bc4 Remove also session files at start 6 years ago

README.md

Cypress

golang-fave

CMS written on Go with MySQL as database. Dynamical, splitted by modules, user friendly and thanks bootstrap is fully adaptive for mobile devices and tablets. All in one binary file, no need to install additional web servers. Go native templates with vars allow to do almost all what are need.

Usage

Usage of ./fave:
  -debug
    debug mode with ignoring log files
  -dir string
    virtual hosts directory
  -host string
    server host (default "0.0.0.0")
  -keepalive
    enable/disable server keep alive
  -port int
    server port (default 8080)

Hosts structure

hosts
├── localhost              # Main host directory
├──── config               # Config directory
├────── .domains           # Attached domains
├────── config.json        # CMS config file
├────── mysql.json         # MySQL config file
├──── htdocs               # Public http files
├──── logs                 # Logs dir
├────── access.log         # Access log file
├────── error.log          # Error log file
├──── template             # Engine templates
├────── 404.html           # Template for 404 page
├────── blog-category.html # Template for blog category
├────── blog-post.html     # Template for blog post
├────── blog.html          # Template for blog home page
├────── footer.html        # Footer
├────── header.html        # Header
├────── index.html         # Template for home page
├────── page.html          # Template for any other pages
├────── robots.txt         # Host robots.txt file
├────── scripts.js         # Theme scripts file
├────── shop-category.html # Template for shop category
├────── shop-product.html  # Template for shop product
├────── shop.html          # Template for shop home page
├────── sidebar-left.html  # Can be included in templates
├────── sidebar-right.html # Can be included in templates
├────── styles.css         # Theme styles file
└──── tmp                  # Temporary dir for session files

Unlimited hosts count. Template variables in Wiki or here and here.
Docker image: https://hub.docker.com/r/vladimirok5959/fave

Development

  • make - vet, test, build and run in debug mode locally
  • make build - build release for Linux, Mac OS X and Windows
  • make format - format all code by gofmt utility
  • make update - get all dependencies and put to vendor folder
  • make docker-test - build image and start on port 8080
  • make docker-img - build docker image only
  • make docker-push - build and push image to docker hub
  • make migrate - create new empty migration file
  • make cy-dev - cypress tests in browser
  • make cy - cypress tests in console
  • make ab - http stress test

Used resources