Feature:
- Use gin as router;
- Use gorm to abstract db operation;
- Use jwt to manage session;
- Package assets into executable, easy to deploy;
QA:
-
How to embed assets?
Put your assets(html/js/css/images/mp3) into directory
assets
, everthing will be loaded
intoembed.FS
during compilation. -
How to add new data model?
Define your model's structure in model package, make sure it implements the
migratable
interface,
finally modifydbTables
variable, tables will be automatically created/updated on server's startup.