DCTewi / Tewi-hwBoard

A homework management web application. | 一个管理作业的 Web App

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

  1. Pre-install before deployment
sudo apt install golang sqlite3 supervisor
go version
go env
sqlite3 -version
  1. Get this application
go get github.com/dctewi/tewi-hwboard
  1. 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
  1. Complie and run for first time and generate config.json
cd ~/hwboard
go build github.com/dctewi/tewi-hwboard
./tewi-hwboard
  1. Setting up

Edit the generated ~/hwboard/config.json/ file to customize your app instace. The Json file will be reload when app launched.

  1. 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.

Contact

dcewi@dctewi.com

Lincense

License-MIT

About

A homework management web application. | 一个管理作业的 Web App

License:MIT License


Languages

Language:Go 76.9%Language:Smarty 21.9%Language:CSS 0.7%Language:JavaScript 0.6%