Giter Site home page Giter Site logo

cs410p_rust_web_dev's Introduction

Rust Web Example

Robert Elia 2024

Description from the syllabus

Course - TOP: Rust Web Development.

The Rust Programming Language is experiencing rapid adoption in part due to its ability to provide easy, fast and safe programming for systems that span low-level and high-level concerns. Rust is increasingly being used to write Web services, including back-ends, front-ends, microservices and clients. A number of high-quality Rust web server and client frameworks are available to support this activity. In this course students will learn to work with Rust and the Web.

Project Overview

Simple API using Rust and the Axum framework that provides an API for creating, reading, updating, and deleting questions.

API Endpoints

  • GET /questions: Retrieves a list of all questions
  • GET /paginated_questions: Retrieves a paginated list of questions
  • GET /questions/{id}: Retrieves a question by ID
  • POST /questions/add: Creates a new question
  • DELETE /questions/{id}: Deletes a question by ID
  • PUT /questions/{id}: Updates a question by ID
  • GET /questions/{id}/answer
  • PUT /questions/{id}/answer
  • POST /questions/{id}/answer
  • DELETE /questions/{id}/answer

Documentation

API documentation can be found at /swagger-ui, /redoc, and /rapidoc

Running the APP

docker compose up --build
npm ci then trunk serve in the frontend directory Server will then be available at http://localhost:3000 or http://127.0.0.1:3000 Front end will be available at http://localhost:8080 or http://127.0.0.1:8080

Additionally, the server can be run with different levels of tracing RUST_LOG=error cargo run RUST_LOG=info cargo run RUST_LOG=debug cargo run RUST_LOG=trace cargo run

cs410p_rust_web_dev's People

Contributors

relia1 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.