All Projects → rstropek → RustyRockets

rstropek / RustyRockets

Licence: other
This repository contains a sample that I used to do an introduction talk about Building Web APIs with Rust and Rocket at the Rust Linz meetup.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to RustyRockets

ApiDmS
Open Source Document Management System.
Stars: ✭ 16 (-36%)
Mutual labels:  webapi
Rocket
FreeCAD Rocketry Workbench
Stars: ✭ 29 (+16%)
Mutual labels:  rocket
IdentityServerSample
Sample ASP.NET Core MVC and Angular apps and API using Identity Server 4
Stars: ✭ 25 (+0%)
Mutual labels:  webapi
dotnet-webapi-boilerplate
Clean Architecture Template for .NET 6.0 WebApi built with Multitenancy Support.
Stars: ✭ 2,200 (+8700%)
Mutual labels:  webapi
WebApiWithBackgroundWorker
Small demo showing how to implement Pub/Sub with a BackgroundWorker in .NET Core
Stars: ✭ 55 (+120%)
Mutual labels:  webapi
worddaze
A Blazor Powered Blogging Application
Stars: ✭ 78 (+212%)
Mutual labels:  webapi
Nasa-And-Spacex-Cooperation
Theme Outer Space
Stars: ✭ 41 (+64%)
Mutual labels:  rocket
auth-rs
Simple username/password authentication system for Rocket
Stars: ✭ 19 (-24%)
Mutual labels:  rocket
FigmaPy
An unofficial Python3+ wrapper for Figma API
Stars: ✭ 19 (-24%)
Mutual labels:  webapi
rich-uncle-pennybags-bot
A telegram bot for all of your crypto needs. Works over the bitfinex and coinmarketcap APIs
Stars: ✭ 15 (-40%)
Mutual labels:  rocket
CotacaoMonetariaBot
Chatbot para cotação de algumas moedas estrangeiras para o Real (BRL).
Stars: ✭ 27 (+8%)
Mutual labels:  webapi
rocket-multipart-form-data
This crate provides a multipart parser for the Rocket framework.
Stars: ✭ 34 (+36%)
Mutual labels:  rocket
msa-toolkit
The MSA Toolkit provides useful codes for flight simulations and analysis, aerodynamic optimization and sensibility analysis. The codes are implemented by the MisSion Analysis Team.
Stars: ✭ 22 (-12%)
Mutual labels:  rocket
RESTvsGRPC
Evaluating Performance of REST vs. gRPC
Stars: ✭ 36 (+44%)
Mutual labels:  webapi
N-Tier-Architecture
This is a n-layer architecture based on Common web application architectures.
Stars: ✭ 105 (+320%)
Mutual labels:  webapi
git-falcon9
No description or website provided.
Stars: ✭ 16 (-36%)
Mutual labels:  rocket
react-use-observer
Performant react hooks for WebApi Observers, useResizeObserver, useInteractionObserver, useMutationObserver
Stars: ✭ 19 (-24%)
Mutual labels:  webapi
JRCLUST
JRCLUST
Stars: ✭ 32 (+28%)
Mutual labels:  rocket
Webapi JWT Authentication
Secure web api endpoint with JWT
Stars: ✭ 51 (+104%)
Mutual labels:  webapi
webapis-media-recorder
這個範例示範如何透過瀏覽器內建的 MediaStream API 來打造影音錄影的功能
Stars: ✭ 27 (+8%)
Mutual labels:  webapi

Introduction to Rocket

Description

Hero Image

This repository contains a sample that I used to do an introduction talk about Building Web APIs with Rust and Rocket at the Rust Linz meetup.

Storyboard

Prepare Environment

cargo new rusty-rocket-live
code .
cp -R ../rusty-rocket/.vscode ./.vscode

Dependencies

  • Open Cargo.toml
  • Snippet 010-rocket-dependency in [dependencies]
  • Snippet 015-rocket-git
  • cargo build

Basics

  • Open main.rs
  • Snippet 020-use, fold region
  • Snippet 025-basic-get and 030-basic-launch
cp -R ../rusty-rocket/requests.http .
  • Demo request

Tests

  • Create src/tests.rs
  • Snippet 040-basic-test in tests.rs
  • Snippet 035-annotate-test-module in main.rs
  • cargo test

Dynamic Paths

  • Snippet 045-dynamic-path in main.rs
  • Add greeting to mounts
  • Demo request
  • Snippet 050-dynamic-path-test in test.rs
  • cargo test

Querystring Parameters

  • Snippet 055-query-string-params in main.rs
  • Add query_greeting to mounts
  • Demo request
  • Snippet 060-query-string-tests in test.rs
  • cargo test

Request Guards

  • Create src/api_key.rs
  • Snippet 065-custom-request-guard in api-key.rs
  • Snippet 070-route-with-guard in main.rs
  • Add protected to mounts
  • Demo request
  • Snippet 075-tests-guarded-route in test.rs
  • cargo test

Cookie Guards

  • Snippet 080-cookie-guard in main.rs
  • Add login and session to mounts
  • Demo request
  • Snippet 085-cookie-test in test.rs
  • cargo test

Simple REST API

  • Snippet 090-hero-api-region
  • Inside:
    • Snippet 100-hero-api-structs-types
    • Snippet 105-in-memory-repository
    • Snippet 110-add-hero-with-post
    • Snippet 111-add-managed-hashmap
    • Snippet 115-get-single-hero
    • Snippet 120-get-all-heroes
  • Add add_hero, get_hero, and get_all to mounts
  • At the end: Snippet 111-add-managed-hashmap
  • Demo request

Catcher

  • Snippet 125-404-catcher
  • Snippet 126-register-catcher
  • Demo request

Fairings

  • Snippet 130-log-fairing
  • Snippet 135-attach-fairing
  • Execute some demo requests (GET and POST)
  • Show counter with demo request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].