yeenserve is a web app for serving random photos.

Overview

yeenserve

yeenserve is a simple web app written in Rust that serves random images from a directory. It was written as the backing application for hyena.photos, as I wanted to replace the NGINX random index module that I had been using up until now.

The backend supports PNG (png extension) and JPEG (jpg and jpeg extensions) files, but support for other files can be easily added if requested.

Configuration

yeenserve supports both file-based and S3-based provider backends, and is controlled by the YEENSERVE_BACKEND environment variable. See all the options below.

Name Default Backend Description
YEENSERVE_BACKEND file N/A Type of backend to get files from. Options are [file, s3].
YEENSERVE_PATH resources/ file Path containing files to serve.
YEENSERVE_S3_BUCKET Required s3 S3 bucket to pull files from.
YEENSERVE_S3_REGION Required s3 S3 region where the bucket is located.
YEENSERVE_S3_ENDPOINT Required s3 S3 endpoint used to contact the S3 API. Currently required for all providers, even AWS S3 themselves.
YEENSERVE_S3_ACCESS_KEY Required s3 S3 access key used to authenticate with the S3 API.
YEENSERVE_S3_SECRET_KEY Required s3 S3 secret key used to authenticate with the S3 API.
You might also like...
Jotsy is a self-hosted, free and open-source note taking app with a goal of simplicity in mind
Jotsy is a self-hosted, free and open-source note taking app with a goal of simplicity in mind

Jotsy: Just your notes Jotsy is a self-hosted, free and open-source note taking app with a goal of simplicity in mind. It is powered by Skytable. Read

A Rust app for creating RSS Feeds in Notion.
A Rust app for creating RSS Feeds in Notion.

Notion Feed A Rust app for creating RSS Feeds in Notion. Features Manage your RSS sources in a separate Notion page Enable/disable RSS sources Read fe

An occult chat app using Cabal 🧙✨🔮
An occult chat app using Cabal 🧙✨🔮

coven 🧙✨🔮 An occult chat app using Cabal Uses the cable.rs implementation of the new Cable protocol. For now is a desktop app, but with the magic of

A Rust web framework

cargonauts - a Rust web framework Documentation cargonauts is a Rust web framework intended for building maintainable, well-factored web apps. This pr

A Rust library to extract useful data from HTML documents, suitable for web scraping.

select.rs A library to extract useful data from HTML documents, suitable for web scraping. NOTE: The following example only works in the upcoming rele

A Google-like web search engine that provides the user with the most relevant websites in accordance to his/her query, using crawled and indexed textual data and PageRank.
A Google-like web search engine that provides the user with the most relevant websites in accordance to his/her query, using crawled and indexed textual data and PageRank.

Mini Google Course project for the Architecture of Computer Systems course. Overview: Architecture: We are working on multiple components of the web c

A rust web framework with safety and speed in mind.

darpi A web api framework with speed and safety in mind. One of the big goals is to catch all errors at compile time, if possible. The framework uses

A web framework for Rust.

Rocket Rocket is an async web framework for Rust with a focus on usability, security, extensibility, and speed. #[macro_use] extern crate rocket; #[g

Rust / Wasm framework for building client web apps
Rust / Wasm framework for building client web apps

Yew Rust / Wasm client web app framework Documentation (stable) | Documentation (latest) | Examples | Changelog | Roadmap | 简体中文文档 | 繁體中文文檔 | ドキュメント A

Comments
  • S3 backend

    S3 backend

    Rework the code to allow for static file serving, as well as an S3 backend that lists a bucket's contents and picks a random file to proxy through the web server (might support direct links later...).

    Depends on #4.

    enhancement 
    opened by kubeliv 0
  • Static images controller

    Static images controller

    To allow for caching between Cloudflare or other CDNs, it'd be nice to rewrite the index page to simply slap an <img> tag to a static image path. This would allow caching on the clientside, as well as a CDN like Cloudflare.

    enhancement 
    opened by kubeliv 0
  • Caching file lists for S3 backend

    Caching file lists for S3 backend

    If an end-user is using an S3 provider, they are likely being charged for API calls, which could get costly since every call to get a random picture will use the list API. It'd be beneficial to cache the file list for a configurable time.

    enhancement 
    opened by kubeliv 0
  • Extension case breaks filtering

    Extension case breaks filtering

    If you try to add a file with the extension "JPG" (or any other assortment of casing that isn't explicitly lowercase), the filtering code will exclude it and never consider that image.

    bug 
    opened by kubeliv 0
Releases(v0.2.0-rc1)
  • v0.2.0-rc1(Aug 5, 2022)

    What's Changed

    • Fix Code Warnings by @kendfinger in https://github.com/mysticlgbt/yeenserve/pull/3
    • Static route and S3 Support by @lgorence in https://github.com/mysticlgbt/yeenserve/pull/6

    New Contributors

    • @kendfinger made their first contribution in https://github.com/mysticlgbt/yeenserve/pull/3

    Full Changelog: https://github.com/mysticlgbt/yeenserve/compare/v0.1.0...v0.2.0-rc1

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Jul 15, 2022)

    Initial release that provides a simple random image web server with configuration via the YEENSERVE_PATH environment variable.

    Deploy via Docker

    docker run -it --detach --restart=unless-stopped --name yeenserve -p 8000:8000 -v /path/to/pics:/pics ghcr.io/mysticlgbt/yeenserve:0.1.0
    
    Source code(tar.gz)
    Source code(zip)
Bundle Shiny Applications for serving with WebR.

WebR Bundle A tool for bundling Shiny Apps with WebAssembly. R Package Installation Install the package from GitHub: # install.packages("pak") pak::pa

Appsilon 14 Oct 29, 2023
example of a full stack web app (backend and frontend) wrtiten in Rust

rust-fullstack-example An example of creating a full stack web application (backend and frontend) using Rust. Backend Go to ./backend and start the se

mario 41 Dec 16, 2022
Turn any web page into a desktop app (but, lightweight <1MB)

Intro Turn any web page into a desktop app (but, lightweight <1MB) The bundle will be less than 2MB Demo: https://i.imgur.com/BLr03oF.mp4 Install carg

null 9 Dec 27, 2022
Sauron is an html web framework for building web-apps. It is heavily inspired by elm.

sauron Guide Sauron is an web framework for creating fast and interactive client side web application, as well as server-side rendering for back-end w

Jovansonlee Cesar 1.7k Dec 26, 2022
Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

Actix 16.2k Jan 2, 2023
Hot reload static web server for deploying mutiple static web site with version control.

SPA-SERVER It is to provide a static web http server with cache and hot reload. 中文 README Feature Built with Hyper and Warp, fast and small! SSL with

null 7 Dec 18, 2022
Code template for a production Web Application using Axum: The AwesomeApp Blueprint for Professional Web Development.

AwesomeApp rust-web-app More info at: https://awesomeapp.dev/rust-web-app/ rust-web-app YouTube episodes: Episode 01 - Rust Web App - Course to Produc

null 45 Sep 6, 2023
A highly customizable, full scale web backend for web-rwkv, built on axum with websocket protocol.

web-rwkv-axum A axum web backend for web-rwkv, built on websocket. Supports BNF-constrained grammar, CFG sampling, etc., all streamed over network. St

Li Junyu 12 Sep 25, 2023
Learning Rust: Sample App

mars_calc The App runs on rust takes inpit weight in kg of earth and returns the weight on mars My first rust App Ownership Rules First, let’s take a

Koti Syamala 0 Dec 24, 2021
This is the settings app for Pop!_OS's new COSMIC desktop.

cosmic-settings This is the settings app for Pop!_OS's new COSMIC desktop. It is currently WIP and not ready for use, although if you want to run it a

Pop!_OS 53 Dec 11, 2022