Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smores56/personal-site-api
The GraphQL API for my personal website.
https://github.com/smores56/personal-site-api
Last synced: 1 day ago
JSON representation
The GraphQL API for my personal website.
- Host: GitHub
- URL: https://github.com/smores56/personal-site-api
- Owner: smores56
- Created: 2021-01-14T01:14:28.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-08T23:07:55.000Z (over 3 years ago)
- Last Synced: 2023-03-10T17:12:50.577Z (over 1 year ago)
- Language: Rust
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Personal Site API
The GraphQL API backend for my personal site,
[sam-mohr.com][personal site]. You can find the API hosted
at [api.sam-mohr.com][api].## How it Works
My website hosts all of my movie (and TV show) reviews as well
as my recipes. Rather than storing them in a database like
[SQLite][sqlite], I wanted to store them in a human-readable format.
Thus, all of my records are stored in YAML files that are cloud-synced
between all of my personal machines and the server that this API
is hosted on using [MEGASync][megasync]. Per request, this API
parses every YAML file in each directory and serves them over a
JSON API, exposed with [GraphQL][graphql].You can see the definitions for all exposed collections of data at the
[GraphiQL][api graphiql] page for this API.## Usage
You'll need [Rust installed][install rust] to run this API yourself.
To install it to your system, simply run the following:
```console
$ cargo install --git https://github.com/smores56/personal-site-api
```You can then run the API by providing a port to listen on and
(optionally nested) folders of reviews and recipes like so:```console
$ personal-site-api --port=1234 --review-dir=reviews/ --recipe-dir=recipes/
```[sqlite]: https://sqlite.org/index.html
[megasync]: https://mega.nz/sync
[graphql]: https://graphql.org/
[api graphiql]: https://api.sam-mohr.com/graphiql
[personal site]: https://sam-mohr.com
[api]: https://api.sam-mohr.com
[install rust]: https://www.rust-lang.org/tools/install