Mirror

Vova Tkach a6a368b06d CP mobile fixes, px to rem 6 years ago
assets a6a368b06d CP mobile fixes, px to rem 6 years ago
consts a6a368b06d CP mobile fixes, px to rem 6 years ago
database cf2e5d522c Add unique key for users table 6 years ago
engine 7838ab4173 Optimization 6 years ago
hosts 1c566f6bcc Default demo template 6 years ago
logger a79ae986ce Platform detection, disable colored console for windows 6 years ago
modules 8f846165cd Fix pages module breadcrumbs 6 years ago
testdata 1eacf2a1b8 Rename file again 6 years ago
utils e360d485c5 Template error page instead engine error 6 years ago
vendor 781587b005 Move resources from main file, upgarde deps 6 years ago
.gitignore 7838ab4173 Optimization 6 years ago
LICENSE c391c57bd1 Update LICENSE 6 years ago
Makefile a6a9ed29a4 Makefile fix, update README.md 6 years ago
README.md 1eacf2a1b8 Rename file again 6 years ago
go.mod 781587b005 Move resources from main file, upgarde deps 6 years ago
go.sum 781587b005 Move resources from main file, upgarde deps 6 years ago
main.go 075cdd9938 Fix logger time display, fix windows 10 console print at start 6 years ago
run.mac.sh 8420fc8dc3 Run example sh file fo mac 6 years ago
run.unix.sh 68f0607f28 Run example sh file for unix 6 years ago
run.windows.bat fd4c83250f Run example bat file for windows 6 years ago
session.go ac8d29ccb7 Session graceful shutdown 6 years ago

README.md

golang-fave

CMS written in Go with MySQL as database. Dynamical, splitted by modules, user friendly and thanks bootstrap is fully adaptive for mobile devices and tablets. Thanks Go language it's fastern, all in one binary file, no need to install additional web servers. Go native template 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")
  -port int
    server port (default 8080)

Hosts structure

hosts
├── localhost        # Main host directory
├──── config         # Config directory
├────── 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
├────── footer.html  # Footer
├────── header.html  # Header
├────── index.html   # Template for index page
├────── page.html    # Template for any other pages
├────── sidebar.html # Can be included in templates
└──── tmp            # Temporary dir for session files

Unlimited hosts count. Template variables in Wiki or here and here.

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