GithubHelp home page GithubHelp logo

iminamoto / grasswave Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rafal06/grasswave

0.0 0.0 0.0 708 KB

A simple and easy to self-host, personal server for file hosting on the web

License: GNU Affero General Public License v3.0

JavaScript 12.38% Rust 56.16% CSS 24.86% Dockerfile 6.60%

grasswave's Introduction

Grasswave CDN

A stupidly simple and easy to self-host, personal server for file hosting on the web. Written in Rust.

Thanks, @Maciejowski, for the stylesheet!

Screenshots

screenshot of the main page

Show more

Mobile layout

mobile layout

Search

search

Tag search

tag search

Installation

Docker (recommended)

  1. Install Docker
  2. Create a new directory and, inside it, a file called docker-compose.yml
  3. Copy the following contents into that file:
version: '3.3'

services:
  grasswave:
    image: rafal06/grasswave:latest
    container_name: grasswave
    restart: unless-stopped
    ports:
      - '7000:7000'
    volumes:
      - ./data:/data
  1. Start the container with the command docker compose up -d
  2. Copy the files for serving to the ./data/files directory (see the section How to use)
  3. If the container is not starting, check the logs with docker compose logs

Compile from source

  1. Install the Rust toolchain
  2. Clone this repository
  3. Create the files folder and put your files inside (see How to use)
  4. Run cargo run --release
  5. This will compile and run the project

How to use

For every file you want to publish, create a seperate directory in the files folder, and place the files inside of them. In every directory, create a file named info.toml.

files
├── lorem
│   ├── lorem.tar.xz
│   └── info.toml
├── ipsum
│   ├── info.toml
│   └── ipsum.tar.xz
└── dolor
    ├── info.toml
    └── dolor.tar.xz

In the toml files, set the name and description to display, and the name of the file to publish, in the following format:

name = "Lorem"
description = "Lorem ipsum dolor sit amet"
tags = ["lorem", "ipsum", "dolor"]
path = "lorem.tar.xz"

Run the executable, and that's it! You can visit it in the browser at the link displayed in the terminal.

You can configure it in a config file created automatically on the first run.

Default config
displayed_name = "Grasswave CDN"
files_path = "files"
accent_colors = ["#1D9F00", "#4DE928"]
http_port = 7000

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.