command
Version:
v0.3.0
Opens a new window with list of versions in this module.
Published: Aug 19, 2026
License: AGPL-3.0
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
shopadmin example
A minimal, runnable server that mounts the shopadmin panel on an
in-memory SQLite database. No external services required.
Run
From the shopadmin module root:
go run ./example
Then open http://localhost:8080/ in your browser and click
Open Shop Admin, or go directly to http://localhost:8080/admin/shop.
What you get
/ — landing page with a link into the admin
/admin/shop — shop admin dashboard
/admin/shop?controller=products — product manager
/admin/shop?controller=categories — category manager
/admin/shop?controller=discounts — discount manager
/admin/shop?controller=orders — order manager
Configuration
Edit the constants at the top of main.go to change:
addr — listen address (default :8080)
dbFile — :memory: for an ephemeral DB, or a file path to persist
data across restarts
adminURL, homeURL, filesURL — mount points
Notes
AuthUserID is intentionally nil, so the panel is open. Provide a
real implementation in production.
- The in-memory database is reset on every restart. Pass a file path
to
openDB to persist data.
Documentation
¶
Example shopadmin server.
Boots an HTTP server with an in-memory SQLite database and mounts the
shopadmin panel at /admin/shop. No external services required.
Run from the shopadmin module root:
go run ./example
Then open http://localhost:8080/ in your browser.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.