Tewi-hwBoard
中文版本点击这里
A homework management web application in GoLang.
Previews
Homepage:
LoginPage:
ListPage:
AdminPage:
Features
- Easy to deploy
- Easy to localize
- Based on Go 1.14.1
- Based on SQLite3
Deployment
This is a template building procedure on Ubuntu 18.04 LTS.
- Pre-install before deployment
sudo apt install golang sqlite3 supervisor
go version
go env
sqlite3 -version
- Get this application
go get github.com/dctewi/tewi-hwboard
- Create directory
Copy ./app/
into somewhere you want to run this app, such as ~/hwboard
, and create a sqlite3 database here:
mkdir ~/hwboard ~/hwboard/app
cd ${GOPATH}/src/github.com/dctewi/tewi-hwboard/
cp ./app/* ~/hwboard/app/
cd ~/hwboard
sqlite3 database.db
sqlite> .read app/database.sql
sqlite> .quit
- Complie and run for first time and generate config.json
cd ~/hwboard
go build github.com/dctewi/tewi-hwboard
./tewi-hwboard
- Setting up
Edit the generated ~/hwboard/config.json/
file to customize your app instace. The Json file will be reload when app launched.
- Launch app by daemon
Create and edit /lib/systemd/system/hwboard.service
:
[Unit]
Description=hwboard
After=network.target
[Service]
User=yourusername
WorkingDirectory=/home/yourusername/hwboard/
ExecStart=/home/yourusername/hwboard/tewi-hwboard
Restart=always
[Install]
WantedBy=multi-user.target
Start service by systemctl
:
sudo systemctl daemon-reload
sudo systemctl start hwboard.service
sudo systemctl status hwboard.service
Then you can access your board site on the domain:port you just set.
dcewi@dctewi.com
Lincense