gouweb
is a go web framework for developing app backend
Installation and setup
first create empty directory and go in it
than clone gouweb to this directory:
git clone https://github.com/MikhailBatsin-code/gouweb.git .
You probably have a project structure like this: github.com/
and of course this project wont work. But at first you need to install gouweb
cli that will rename import path to yours use gouweb-fix-imports
than execute binary of gouweb-fix-imports in root of your project
or if want yo can create in your go home directory folders:
mkdir -p $GOPATH/src/github.com/MikhailBatsin-code/
git clone https://github.com/MikhailBatsin-code/gouweb.git
than compile project cli:
go build
You probably want to build it to see if it works:
./gouweb build
and execute binary
Project structure
in root you have folders:
framework: framework itself
src: your project source
www: contains your templates, styles, javascript files
in src:
main.go: main file that you probably wont edit
handlers: where your handlers stored
routes: where you put your routes
routes/alias: where you put names for routes
views: where you will work with templates and page
You WILL write your code as i wrote it in examples
because if you have a big project you want to have
in one file as least as possible lines of code
bootstrap
in folder framewrok/bootstrap you have a file that responds for correct boot of your application
it activates middleware, initializes models, and does a lot of other stuff
Manual is not full now but it is better than it was