This repo was an exercise... an exercise of:
- using TypeScript for the first time in my own BE project...
- trying to write a code that might be re-usable between
Express
,Polka
andKoa
- finding funny usages for HTTP codes...
I faced too many "slip of a tongue" moments while working with male co-developers.
So many times some of us accidentally mentioned "the strapon endpoint" (instead of "bootstrap"... don't ask me why... we're Poles 😂).
So many times I've seen chat messages like curl -X GET /high-heels/on
or PUT /lipstick/on
...that's why I eventually decided to put such an API to life...
You need to have Node@^16 and NPM@^8 (or Yarn@^1) installed on your machine.
- clone the repository
- install dependencies (run
npm install
oryarn install
orbun install
command) - run one of the
dev:*
scripts frompackage.json
file
Middleware for Express
, Polka
and Koa
are available in the src/middleware
folder.
Examples of usage are shown in simple apps in src/app
folder.
Getting toys
REQUEST:
# GET http://localhost:1234/handcuffs
RESPONSE:
{"status":200,"message":"OK"}
Using toys
REQUEST:
# PUT http://localhost:1234/highheels/on
RESPONSE:
{"status":202,"message":"Accepted"}
People
REQUEST:
# GET http://localhost:1234/teenager
RESPONSE:
{"status":451,"message":"Unavailable For Legal Reasons"}
REQUEST:
# GET http://localhost:1234/escort
RESPONSE:
{"status":402,"message":"Payment Required"}
REQUEST:
# POST http://localhost:1234/orgy
RESPONSE:
{"status":429,"message":"Too Many Requests"}
Interactions
REQUEST:
# PUT http://localhost:1234/tongue/into/ear
RESPONSE:
{"status":502,"message":"Bad Gateway"}
REQUEST:
# PUT http://localhost:1234/dick/into/ass
RESPONSE:
{"status":401,"message":"Unauthorized without ?condom"}
Here's an example Postman Collection