Mirror

Vova Tkach 99bbd90fb4 Remove no needed template var 6 years ago
assets 0dc9f329cb Make user profile modal dialog dynamic to prevent hight CPU chrome load on Ubuntu 6 years ago
consts 951035a2c2 Debug mode at runtime, flags to constants 6 years ago
database cf2e5d522c Add unique key for users table 6 years ago
engine a49c288352 Optimize, escape js var value for modal 6 years ago
hosts a08e5be53e DateTime format support 6 years ago
logger 951035a2c2 Debug mode at runtime, flags to constants 6 years ago
modules 99bbd90fb4 Remove no needed template var 6 years ago
utils a49c288352 Optimize, escape js var value for modal 6 years ago
vendor 781587b005 Move resources from main file, upgarde deps 6 years ago
.gitignore d0be3a6e35 Update .gitignore 6 years ago
LICENSE c391c57bd1 Update LICENSE 6 years ago
Makefile a6a9ed29a4 Makefile fix, update README.md 6 years ago
README.md b2b4d510fd Update README.md 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 951035a2c2 Debug mode at runtime, flags to constants 6 years ago
session.go ac8d29ccb7 Session graceful shutdown 6 years ago

README.md

golang-fave

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
├────── 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