Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xmarcos/enchinito-api
A useless API for @xmarcos/enchinito using Cloudflare Workers.
https://github.com/xmarcos/enchinito-api
cloudflare cloudflare-workers enchinito meme
Last synced: 2 months ago
JSON representation
A useless API for @xmarcos/enchinito using Cloudflare Workers.
- Host: GitHub
- URL: https://github.com/xmarcos/enchinito-api
- Owner: xmarcos
- License: mit
- Created: 2021-08-10T03:46:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-06T04:01:26.000Z (9 months ago)
- Last Synced: 2024-05-06T05:23:18.501Z (9 months ago)
- Topics: cloudflare, cloudflare-workers, enchinito, meme
- Language: TypeScript
- Homepage: https://enchinito-api.xmarcos.workers.dev/
- Size: 1.88 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# enchinito API
A useless API for [@xmarcos/enchinito](https://github.com/xmarcos/enchinito) using [Cloudflare Workers](https://workers.cloudflare.com/).
## Usage
```bash
curl -s "https://enchinito-api.xmarcos.workers.dev/enchinito/Sudo%20make%20me%20a%20sandwich" | jq .
# {
# "input": "Sudo make me a sandwich",
# "output": "Sidi miki mi i sindwich",
# "version": "0.1.0"
# }
```You can also get the response in `text/plain` or `application/xml`.
```bash
# pipe-friendly text
curl -s "https://enchinito-api.xmarcos.workers.dev/enchinito/Sudo%20make%20me%20a%20sandwich" -H "Accept: text/plain" | rev
# hciwdnis i im ikim idiS# verbose xml, if you are into that
# brew install python-yq
curl -s "https://enchinito-api.xmarcos.workers.dev/enchinito/Sudo%20make%20me%20a%20sandwich" -H "Accept: application/xml" | xq
#
# Sudo make me a sandwich
# Sidi miki mi i sindwich
# 0.1.0
#
```## Setup
```bash
# needs node v16+
npm install -g wrangler
npm install
```## Development
→
```bash
wrangler dev
# 🤞
```> [Conventional Commits](https://www.conventionalcommits.org/en/about/) are enforced using a hook but there is no `prepare-commit-msg` _wizard_. You can do `npm run commit` if you need that.
## Deploy
→
```bash
wrangler publish
# tail prod logs
wrangler tail
```## But why?