Giter Club home page Giter Club logo

lunch-list's Introduction

๐Ÿ“ lunch-list

lunch-list is a fast and simple web lunch attendance list. This app is fully written in Rust using the actix-web framework for server and API and Redis as database. The front-end web app is written with WebAssembly and yew web app framework.

This project is in no way finished and probably never will. Still, it is a fun project in learning Rust for web applications.

Rust Docker

๐Ÿ› ๏ธ Installation

There are two main ways of running lunch-list: local or in Docker containers. Docker containers are the easiest way, since it only requires docker.

๐Ÿ  Local

Running lunch-list requires the following:

Once these are installed you must first run redis-server. To quickly run everything Redis can be started with:

redis-server

Next you have to build and package the front-end web app using trunk.

cd lunch-list-frontend
trunk build
cp -r dist ..

This builds, packages and moves the files to be deployed to dist/ and moves it to root. Then the lunch-list API can be started from the root of the repo with:

cargo run -p lunch-list-backend

This will install all required dependencies, start the server, connect to Redis and start listening on 127.0.0.1:8080. You can also choose to install the ll executable with

cargo install --path lunch-list-backend

This will install ll to ~/.cargo/bin/.

๐Ÿณ Docker

All required containers can easily be run using Docker and docker-compose. Simply run in the root of the repo:

docker-compose up

This will pull the lunch-list container image from docker.pkg.github.com, so you have to be logged in to GitHub docker packages. lunch-list will now be available at 127.0.0.1:46018. The Redis container has persistence enabled with appendonly and will store database data in redis-data/. Therefore, the data will persist between container runs.

Building Dockerfile

It is also possible to build the Dockerfile yourself. Building the image requires BuildKit, which is available since Docker 18.09. In order to build you first have to enable BuildKit.

export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
docker build . -t lunch-list

API Endpoints

License

This software is distributed under Apache-2.0 license, see LICENSE ๐Ÿ“ƒ

lunch-list's People

Contributors

olavhaasie avatar

Watchers

 avatar

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.