ADORSYS-GIS / e2e-banking-app

Banking app for people
https://adorsys-gis.github.io/e2e-banking-app/
Mozilla Public License 2.0
4 stars 21 forks source link

Setup server in the Rust app #55

Closed stephane-segning closed 5 months ago

stephane-segning commented 6 months ago

Description:

This task focuses on enhancing our Rust project by integrating a base server using the Rocket framework and adding support for serialization and deserialization with Serde, serde_json, and serde_derive. The goal is to lay a solid foundation for our application's backend, allowing for efficient data handling and a robust server setup.

Objectives:

Acceptance Criteria:

  1. The Cargo.toml file is updated with the latest versions of Rocket, serde, serde_json, and serde_derive.
  2. A Rocket server is initialized and runs successfully, listening for incoming HTTP requests on a specified port.
  3. At least one API endpoint is created, using Serde to serialize and deserialize request and response data.
  4. The project compiles without errors, and the endpoint is accessible and correctly handles JSON data as per Serde configurations.
  5. Documentation is provided on how to start the server and interact with the created endpoint.

Resources:

Steps:

  1. Update Cargo.toml: Add the necessary dependencies for Rocket, serde, serde_json, and serde_derive.
  2. Configure Rocket Server: Initialize a Rocket instance and configure it to listen on a default port. Ensure proper error handling and logging are in place.
  3. Implement Serialization/Deserialization: Utilize Serde in conjunction with serde_json and serde_derive to serialize and deserialize data structures for API requests and responses.
  4. Create a Test Endpoint: Develop a basic API endpoint (e.g., /hello) to test the integration of Rocket and Serde. This endpoint should accept a JSON payload, deserialize it, and respond with a serialized JSON.
  5. Testing & Documentation: Test the server and endpoint functionality. Document the setup process, how to start the server, and how to interact with the test endpoint.

Milestones:

  1. Dependency Integration and Server Setup
  2. Serialization/Deserialization Implementation
  3. Endpoint Development and Testing
  4. Documentation
stephane-segning commented 5 months ago

Done in #80. Thank you @Blindspot22 @ndefokou @Calebasah @Tekum-Emmanuella for this work!