Discover Packages
github.com/devgek/webskeleton
command
module
Version:
v0.1.11
Opens a new window with list of versions in this module.
Published: Nov 8, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
go-webskeleton
skeleton for go web projects
This skeleton project contains a basic go web application, using sqlite3 as database and labstack/echo for
writing controller and middleware stuff.
It contains the Entity "user" with the User "admin" preloaded in the database.
It also contains a login form and a simple menu. You can login with "admin/xyz".
Installation
go install github.com/devgek/webskeleton@latest
Bootstrap new Project
cd {your-go-modules}
mkdir {project}
webskeleton bootstrap --type=[api|web|cli] --repository={repository} --user={user} --project={project} --title={projecttitle} --templatedir={GOPATH}\pkg\mod\github.com\devgek\webskeleton@v0.1.7
cd {project}
go run main.go serve --config=_test/config-serve.yaml
Generate new Entities
Write models-file (e.g. account.go) in directory models
webskeleton generate --type=db --path={repository/user/project} or webskeleton generate --path={repository/user/project}
--> generates files models/generated/entity_factory_creator.go and models/generated/entity_types_impl.go
--> all *.go - files in directory models are taken for generation process
Modify data/datastore --> complete db.automigrate(...) with account
Make golang html templates for new Entities (e.g. "account")
Modify models-file (e.g. account.go) in directory models, set gui:yes and nav:yes
webskeleton generate --type=gui
--> generates files web/app/template/templates/account.html
--> generates files web/app/template/templates/account-edit.html
--> generates files web/app/template/templates/entity-nav.html
--> all *.go - files in directory models are taken for generation process
Change and complete field names ("name", "short") to field names of account.go
Modify web/app/env/msg/messages.yaml --> create messages for "account" like for "user"
Expand ▾
Collapse ▴
Documentation
¶
Copyright © 2020 Gerald Kahrer <gerald.kahrer@kahrersoftware.at>
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.