A very random collection of services, packed into a RESTful Rust api. https://fej.roosens.me
 
 
 
 
 
 
Go to file
Jef Roosens cedcc3fc9f
Started build script
2021-03-23 09:37:18 +01:00
src Switched to logic-based file structure 2021-03-15 14:48:20 +01:00
.dockerignore
.gitignore
Cargo.lock
Cargo.toml Fixed broken Docker image 2021-03-23 00:08:54 +01:00
Dockerfile Fixed broken Docker image 2021-03-23 00:08:54 +01:00
LICENSE
Makefile Started build script 2021-03-23 09:37:18 +01:00
README.md
build Started build script 2021-03-23 09:37:18 +01:00

README.md

Fej

Fej is an API written in Rust. I started this project to learn the language, and really just have some fun.

Project Structure

The folder structure follows the structure of the URLs, e.g. the route for /hello/world is found in the module src/hello.

Each module contains the following base files:

  • mod.rs: defines the modules' content, and contains the route definitions. The route functions themselves only contain the functionality needed to represent the data, not acquire it.
  • controller.rs: this file contains the actual logic of each route. If the logic becomes too complicated to be contained inside a single file, controller.rs becomes its own module folder named controller.
  • tests.rs: this contains tests for the specific module. This can also be a module directory if need be.

Every module has a routes function that returns its route macros.