Skip to content

Feature/rust#11

Merged
adrrf merged 2 commits intomainfrom
feature/rust
Nov 17, 2024
Merged

Feature/rust#11
adrrf merged 2 commits intomainfrom
feature/rust

Conversation

@TunixR
Copy link
Copy Markdown
Contributor

@TunixR TunixR commented Nov 17, 2024

This pull request involves significant changes to the project, primarily focusing on migrating from a JavaScript-based backend to a Rust-based one, and configuring the API gateway. The key changes include the addition of configuration files, the removal of JavaScript files, and the introduction of Rust modules for configuration parsing and main application logic.

Migration to Rust-based backend:

  • Cargo.toml: Added the Rust package configuration for the new api-gateway project, including dependencies such as serde, tokio, hyper, and reqwest.
  • src/config/parser.rs: Introduced a new Rust module for parsing configuration files using serde_yaml. This module defines structures for service configuration and no-auth endpoints, and includes a function to load the configuration from a file.
  • src/main.rs: Added the main application logic for the API gateway in Rust. This includes handling incoming requests, forwarding them to the appropriate downstream services, and performing user authorization when necessary.

Configuration changes:

  • config.yaml: Added a YAML configuration file for the API gateway, specifying the gateway URL, authorization API URL, service paths, and endpoints that do not require authentication.

Removal of JavaScript files:

  • package.json: Removed the JavaScript package configuration file, which included dependencies, scripts, and metadata for the previous Node.js-based backend.
  • src/api.js, src/config/index.js, populators/Template.js, populators/runPopulator.js: Removed several JavaScript files related to the previous backend implementation, including API setup, MongoDB connection, and data population scripts. [1] [2] [3] [4]

Cleanup and miscellaneous:

  • .npmrc: Removed npm configuration settings that are no longer relevant due to the migration to Rust.
  • eslint.config.mjs, vitest.config.js: Removed ESLint and Vitest configuration files, which are no longer needed after the migration. [1] [2]

@TunixR TunixR self-assigned this Nov 17, 2024
@github-actions github-actions Bot added 📦 Dependencies Pull requests that update a dependency file ⚙️ Configuration Indicates the scope is related to the configuration 😎 size/m Pull request size M labels Nov 17, 2024
Copy link
Copy Markdown
Contributor

@adrrf adrrf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm (but in rust)

@adrrf adrrf merged commit f1a9f1c into main Nov 17, 2024
@adrrf adrrf deleted the feature/rust branch November 17, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️ Configuration Indicates the scope is related to the configuration 📦 Dependencies Pull requests that update a dependency file 😎 size/m Pull request size M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants