tewi-hwboard

command module
v0.0.0-...-0169c2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 10 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
core
frame

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL