Zurück zur Skill-Übersicht

Skill-Wissen und Projektmarkt

LogRocket

Freelancer, Projekte, Experten und Wissen rund um LogRocket.

Kategorie

Monitoring

LogRocket Freelancer und Projekte finden

Auf jobtic.com vernetzen sich IT-Freelancer direkt mit Recruitern, Fachbereichsleitern und Projektanbietern. Egal ob du Expertise im Bereich LogRocket suchst oder anbietest, unser intelligenter Algorithmus bringt dich direkt mit den passenden Spezialisten und Projekten zusammen.

Alles Wissenswerte zum Thema LogRocket

Wikipedia

Rocket (web framework)

Artikel öffnen

Rocket is a web framework written in Rust.[3][4] It supports handling HTTP requests, Web Sockets, JSON, templating, and more. Its design was inspired by Rails, Flask, Bottle, and Yesod.[5] It is dually licensed under the MIT License and the Apache License.

To create a web server with Rocket, the user will define an application, then use the "mount" function to attach "routes" to it. Each "route" is a rust function with a macro attached to it. The function will define code that should respond to an HTTP request. The macro that is written as part of the function declaration will define which HTTP Method (such as GET, POST, PUT, etc.) it should be handle, as well as a pattern describing the URL it should be relevant to.

Example

This is an example of a working rocket application:

#[macro_use] extern crate rocket;

#[get("/hello/<name>/<age>")]
fn hello(name: &str, age: u8) -> String {
    format!("Hello, {} year old named {}!", age, name)
}

#[launch]
fn rocket() -> _ {
    rocket::build().mount("/", routes![hello])
}

Sending an HTTP GET request to /hello/John/50 would return the following response:

Hello, 50 year old named John!.

Features

Rocket implements the following features:

  • Routing - Rocket allows the user to define the structure of routes that the application should consider, as well as the code that should run in different routing combination. For example, the following code will make the rocket application to respond to the /hello route with "Hello World":
    #[get("/")]
    fn index() -> &'static str {
        "Hello, world!"
    }
    
  • Form Data - Rocket allows the user to define a Serde model, and use it to parse the Form Data, and pass it as native rust object to the route handler.
  • Request Guards - the route handlers can contain a special kind of parameters named "Request Guard"s that are meant to prevent the code inside the handler to be called in case a certain condition is not met. This feature can be used for example, to prevent requests that do not contain a API Key. By using the Request Guard feature, the user can define the condition in one place, and apply it to prevent access to multiple routes by adding the guard to their list of parameters.

References

  1. ^ "Sergio Benitez - Who Am I?". sergio.bz. Retrieved 2020-05-30.
  2. ^ "Release 0.5.1". 23 May 2024. Retrieved 25 May 2024.
  3. ^ Schlothauer, Sarah (December 14, 2018). "Speedy Rust framework for web apps burns through the sky". JAXenter. Retrieved May 29, 2020.
  4. ^ Ekwuno, Obinna (October 18, 2019). "The best Rust frameworks to check out in 2019". LogRocket. Retrieved May 29, 2020.
  5. ^ "Introduction - Rocket Programming Guide". rocket.rs. Retrieved 2020-05-30.

External links

KotlinPerlPHPPythonRubyRustScalaSmalltalkOther languages


Wikipedia

Dieser Text basiert auf dem Artikel Rocket (web framework) aus der freien Enzyklopädie Wikipedia und steht unter der Lizenz Creative Commons CC-BY-SA 3.0 Unported. Eine Liste der Autoren ist in der Wikipedia verfügbar.

Monitoring

Kontakte aufbauen

Bau mit jobtic.com dein Netzwerk im Bereich LogRocket und anderen Fachgebieten gezielt auf. Die Plattform bringt dich ohne Umwege mit den richtigen Geschäftskontakten zusammen, sowohl für die Projektakquise und Expertensuche als auch den Austausch mit der Freelancer-Community.

Vernetzung stärken

Auf jobtic verbindest du dich direkt mit spezialisierten Freelancern und Auftraggebern rund um LogRocket und andere IT-Themen. Die Plattform vereint dabei Wissensdatenbank und Projektmarkt. So knüpfst du wertvolle Kontakte und findest sofort die passenden Köpfe oder IT-Projekte.

Zentral vernetzen

Ob für Projekte oder den Wissensaustausch mit Gleichgesinnten: jobtic ist deine Plattform für LogRocket und alle Themen der IT-Welt. Vernetze dich direkt mit Experten und Projektanbietern, finde zu deiner Spezialisierung passende Aufträge und nutze aktuelles Know-how für dein Business.

Passende Projekte zu LogRocket

Mehr Projekte
Im Moment ist kein LogRocket-Projekt offen. Du suchst ein Projekt in diesem Bereich? Versuch es mit anderen Stichwörtern und schau regelmäßig vorbei, hier tut sich ständig etwas! Du hast selbst ein Projekt aus dem Bereich LogRocket? Stell es jetzt ein und sichere dir die volle Aufmerksamkeit!