GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NoraCodes/rfortune: A Rust quotation webapp built using Rocket

BranchesTags
Open more actions menu

Latest commit

 

History

52 Commits
52 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
templates
templates
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
Rocket.toml
Rocket.toml
 
 
screenshot.png
screenshot.png
 
 

Repository files navigation

rfortune

A simple Rust fortune-like webapp with Rocket

A screenshot of rfortune in action

What

This simple webapp reads quotes from a SQLite database and picks a random one to return with each request. It uses templates for HTML responses and serde for JSON. It provides a proof of concept for my use of Rocket.

What this application demonstrates:

  • Database with rusqlite
  • Templates with tera
  • JSON API with serde and the rocket_contrib JSON support
  • Integrated command line management
  • Form data entry
  • Responsive, mobile-first design
  • Custom error pages
  • Rust 2018 compliance
  • Rocket tests

Why

I like Rocket, as a concept. It allows me to use Rust, a language that tends to produce code which is both fast and correct, as a backend for services which typically need to be both fast and correct - web services.

Rocket also works with paradigms I'm familiar with: pluggable datastore and template modules connected by route functions, like Flask.

How

To run the application, simply clone the repo and, assuming that you have a nightly Rust toolchain installed, as well as libsqlite3-dev, run cargo run in the root directory - you'll get a webserver running!

You'll need to add quotes using either cargo run add dev.db <quote> <author> [source] or the JSON API.

License

This software is subject to the terms of the GNU Affero General Public License v3.0.

About

A Rust quotation webapp built using Rocket

Resources

Readme
AGPL-3.0 license
Activity

Stars

9 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.