Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/malcodeman/micro-reddit
Microservice for parsing reddit api.
https://github.com/malcodeman/micro-reddit
microservice reddit-api
Last synced: about 1 month ago
JSON representation
Microservice for parsing reddit api.
- Host: GitHub
- URL: https://github.com/malcodeman/micro-reddit
- Owner: malcodeman
- License: mit
- Created: 2018-11-04T13:30:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T00:59:02.000Z (over 1 year ago)
- Last Synced: 2024-10-29T11:10:38.237Z (2 months ago)
- Topics: microservice, reddit-api
- Language: JavaScript
- Homepage: https://glitch.com/edit/#!/malcodeman-micro-reddit
- Size: 304 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome-repos - micro-reddit - Microservice for getting direct image | video links from subreddits. (Node)
README
# Micro-reddit
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/malcodeman/micro-reddit/blob/master/LICENSE)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)Microservice for getting direct image | video links from subreddits.
## Usage
Micro reddit requires **node v11.0.0** or higher for [URL module](https://nodejs.org/api/url.html) support.
.env file should look like this:
```
PORT=8080
BEHANCE_API_KEY=123
IMGUR_CLIENT_ID=123
GFYCAT_API_KEY=123
FLICKR_API_KEY=123
```To start the service run:
```
yarn install
yarn start
```Client is located [here](https://github.com/malcodeman/reddit-client).
## Design decisions
Why ... ?
- [esm](https://github.com/standard-things/esm) ?
Since node still doesn't support ECMAScript modules without --experimental-modules flag using esm was necessary to avoid .mjs file extension.
When node starts supporting modules removing `-r esm` from package.json start script is all that's needed.
- [fastify](https://github.com/fastify/fastify) ?
Speed.## Documentation
Routes:
- `/subs/:subreddit/:sort`
- `/posts/:postId`
- `/popular`
Supported third-party services:
- imgur
- behance
- gfycat
- supload
- flickr## License
Micro reddit is [MIT licensed](./LICENSE).