{"_id":"418-teapot","name":"418-teapot","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"418-teapot","version":"1.0.0","description":"An Express middleware that refuses to brew coffee (HTTP 418).","main":"index.js","scripts":{"test":"echo \"Skipping tests for now\" && exit 0"},"keywords":["express","middleware","418","teapot","coffee"],"author":{"name":"PragsPud"},"license":"MIT","peerDependencies":{"express":"^5.2.1"},"_id":"418-teapot@1.0.0","gitHead":"645aeec13ddb56d1bcabfb4e75c614d540fc18a8","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-aNIa3N7rFwkqr+505PruoEreeSPo32ETeM6VkujwLVI8PuQ+co4CI07R9BcgDSp5+6u5ksEQMSdcogqAi75bpg==","shasum":"b2e59b3de837d2612d77f0716f51a8b82a32fb10","tarball":"https://registry.npmjs.org/418-teapot/-/418-teapot-1.0.0.tgz","fileCount":5,"unpackedSize":4347,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICLZJDvpSXcbCoqkyeWnosCVZ+tLbA5FgkYTNPhZtYlJAiEA/YZjgkmLoxOE6h4iKkOIF9tsXYJLBfvh3KZQGS0ZCdQ="}]},"_npmUser":{"name":"pragspud","email":"coolpragun007@gmail.com"},"directories":{},"maintainers":[{"name":"pragspud","email":"coolpragun007@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/418-teapot_1.0.0_1782142664257_0.9662639664884174"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-22T15:37:44.208Z","1.0.0":"2026-06-22T15:37:44.390Z","modified":"2026-06-22T15:37:44.607Z"},"maintainers":[{"name":"pragspud","email":"coolpragun007@gmail.com"}],"description":"An Express middleware that refuses to brew coffee (HTTP 418).","keywords":["express","middleware","418","teapot","coffee"],"author":{"name":"PragsPud"},"license":"MIT","readme":"# 418-teapot 🫖☕\n\nA lightweight, fun Express.js middleware that strictly enforces [RFC 2324](https://datatracker.ietf.org/doc/html/rfc2324) by refusing to brew coffee. \n\nIf a route using this middleware is hit, the server will immediately respond with the classic **HTTP 418 \"I'm a teapot\"** status code and message.\n\n## Installation\n\nYou can install this package using npm:\n\n```bash\nnpm install 418-teapot\n```\n\n*(Note: `express` is required as a peer dependency.)*\n\n## Usage\n\nSimply import the middleware and apply it to any Express route where coffee brewing is strictly prohibited.\n\n```javascript\nconst express = require('express');\nconst teapot = require('418-teapot');\n\nconst app = express();\nconst PORT = 3000;\n\n// Apply the teapot middleware to the coffee route\napp.get('/coffee', teapot.middleware);\n\napp.listen(PORT, '0.0.0.0', () => {\n  console.log(`Server is running on port ${PORT}!`);\n});\n```\n\n### The Response\n\nWhen a client makes a `GET` request to `/coffee`, they will receive an HTTP `418` status code along with the following JSON response:\n\n```json\n{\n  \"code\": 418,\n  \"message\": \"I'm a teapot\",\n  \"description\": \"The server refuses to brew coffee because it is, permanently, a teapot.\"\n}\n```\n\n## API Reference\n\nThe module exports the middleware function alongside the raw HTTP 418 data object, giving you flexibility in how you use it.\n\n```javascript\nconst teapot = require('418-teapot');\n\nconsole.log(teapot.code); \n// Returns: 418\n\nconsole.log(teapot.message); \n// Returns: \"I'm a teapot\"\n\nconsole.log(teapot.description); \n// Returns: \"The server refuses to brew coffee because it is, permanently, a teapot.\"\n```\n\n## License\n\nThis project is licensed under the MIT License.\n","readmeFilename":"README.md","_rev":"1-45feaa8002214448691f5ea3e9b8bc1f"}