Giter Club home page Giter Club logo

wol's Introduction

wol

GitHub License

wol screenshot

wol (short for Wake-on-LAN) is a simple interface for sending magic packets, written in Rust and Svelte.

Installation

Installation using Docker

Example

docker run -e CONFIG_FILE=<PATH-TO-CONFIG> -p 3000:3000 ghcr.io/phntxx/wol

Example (Docker Compose)

version: "3.8"
services:

  ...

  wol:
    image: ghcr.io/phntxx/wol
    network_mode: host
    environment:
      - CONFIG_FILE=<PATH-TO-CONFIG>

  ...

Installation from source

Configuration

wol is configured using the config file and environment variables:

Config file

The configuration file tells wol about the saved devices, so that these can be woken up easily. For an example, see config.yml.

Environment variables

Environment variable Docker default Description
RUST_LOG wol Used to configure backend logging
CONFIG_FILE /app/config.yml Location of the configuration file
FRONTEND_PATH /app/frontend Location of the built frontend
ADDRESS 0.0.0.0:3000 The address the backend will bind to

Build from source

You can also build wol from source. In order to do so, please run the following commands:

  1. Clone this git repository:

    git clone https://github.com/phntxx/wol.git
  2. Build the frontend:

    cd wol/frontend
    npm install
    npm run build
  3. Build the backend:

    cd wol/backend
    cargo build

Development

In order to run wol for development purposes, the following commands need to be run:

  1. Clone this git repository:

    git clone https://github.com/phntxx/wol.git
  2. Create an initial build of the frontend:

    cd wol/frontend
    npm install
    npm run build
  3. Run the backend using your initial build of the frontend:

    cd wol/backend
    ADDRESS="0.0.0.0:3000" FRONTEND_PATH="../frontend/build" CONFIG_FILE="../config.yml" cargo run
  4. In another terminal, run the vite development server:

    cd wol/frontend
    npm run dev

The backend should now be accessible on port 3000, with the frontend preview being available on port 5173.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.