Better readme, proper gomod
This commit is contained in:
parent
efb5e7d236
commit
ffe8d01b06
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,5 +23,6 @@ go.work
|
||||||
|
|
||||||
# Custom
|
# Custom
|
||||||
config.toml
|
config.toml
|
||||||
|
miniwol
|
||||||
|
|
||||||
!example/**
|
!example/**
|
||||||
|
|
15
README.md
15
README.md
|
@ -6,11 +6,20 @@ Small web server to send Wake-on-LAN requests to its local network
|
||||||
- Fully static frontend without JS
|
- Fully static frontend without JS
|
||||||
- Binary includes everything except config
|
- Binary includes everything except config
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
Option 1: Run `go build` in this folder after cloning, resulting in a binary `miniwol` in the current directory.
|
||||||
|
|
||||||
|
Option 2: Run `go get git.ulra.eu/adro/miniwol`, resulting in a binary in TODO.
|
||||||
|
|
||||||
|
Put the resulting binary in a place like `/usr/bin/miniwol` if you wish to run it like any command,
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Add an empty config, the program checks for `./config.toml`, `./config/config.toml` and `/etc/miniwol/config.toml`. Make sure miniwol can write to it.
|
Add an empty config, the program checks, in order of priority, for `./config.toml`, `./config/config.toml` and `/etc/miniwol/config.toml`. Make sure miniwol can write to it.
|
||||||
|
|
||||||
Set a password and write its hash to the config using `miniwol setpass <password>`. This will also add the other default fields to the config.
|
Set a password and write its hash to the config using `miniwol setpass <password>`. This will also add the other default fields to the config.
|
||||||
|
|
||||||
Configure the devices you want to be able to wake up as per the [example](./example/config.toml)
|
Configure the devices you want to be able to wake up as per the [example](./example/config.toml).
|
||||||
|
|
||||||
Now you can run the webserver using `miniwol` or `miniwol web`
|
Now you can run the webserver using `miniwol` or `miniwol web` .
|
||||||
|
|
||||||
|
Sessions are simply stored in memory. In case you need to, you can clear all sessions by just restarting the webserver.
|
||||||
|
|
5
main.go
5
main.go
|
@ -3,10 +3,11 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"miniwol/config"
|
|
||||||
"miniwol/web"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"git.ulra.eu/adro/miniwol/config"
|
||||||
|
"git.ulra.eu/adro/miniwol/web"
|
||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,13 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"miniwol/config"
|
|
||||||
"miniwol/lib"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.ulra.eu/adro/miniwol/config"
|
||||||
|
"git.ulra.eu/adro/miniwol/lib"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user