fej/README.md

57 lines
2.0 KiB
Markdown
Raw Normal View History

2021-03-13 22:11:26 +01:00
# Fej
2021-03-04 11:55:24 +01:00
Fej is a RESTful API that does lots of different things. It started as an
experiment to learn Rust, but has grown into a full-on passion project.
2021-03-11 12:16:28 +01:00
## Project Structure
The bulk of the project consists of the main `fej` library. The `src` folder
contains the `lib.rs` file for this library, and all other binaries import from
this main library.
2021-03-11 12:16:28 +01:00
All binaries can be found in [`/src/bin`](src/bin), with the biggest one being
`server`. This is what actually runs as the Rocket.rs server. The other
binaries (with more possibly coming) are utility tools that will most likely be
run as cron jobs inside the containers, e.g. scrapers.
2021-03-11 12:16:28 +01:00
Version 1.1 also introduces the use of a database, namely
[PostgreSQL 13](https://www.postgresql.org/).
2021-03-23 13:47:57 +01:00
## Roadmap
See [roadmap.md](roadmap.md).
2021-04-13 22:35:39 +02:00
## Development
To make development more consistent (and keep my computer a bit cleaner) I've
decided to run the entire toolchain using Docker, with Alpine Linux base
images. This also allows me to make really small final images. Technically,
Docker is the only dependency you need to contribute to this project
(not accounting for language servers etc.).
A [Bash script](fejctl) is provided to speed up development on the various
binaries. It aids in starting up the containers, choosing which binary to run
etc. A quick rundown of its most important features:
```bash
# By default, it compiles the 'server' binary (but doesn't run it)
./fejctl
# The first argument is the action you wish to perform, the second on which
# binary (not all commands need a binary as input, so they just ignore it)
# For example, this will run the binary called server
./fejctl r server
# This runs the tests (all commands also have their full name if you want)
./fejctl t
./fejctl test
# These attach to the two containers
./fejctl sh # Opens a new root shell inside the 'fej' container
./fejctl psql # Open a new psql shell in the fej database
```
2021-04-13 23:55:22 +02:00
## Docker images
The images are available [here](https://hub.docker.com/r/chewingbever/fej).