{"_id":"@bunpressjs/bunpress","_rev":"3-9cb2bee767958b37ac1e70701e5b8982","name":"@bunpressjs/bunpress","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@bunpressjs/bunpress","version":"0.1.0","keywords":["bun","framework","express","middleware","router","server"],"author":{"name":"Abhinay Ambati"},"license":"MIT","_id":"@bunpressjs/bunpress@0.1.0","maintainers":[{"name":"abhinay_ambati","email":"abhinayambati4@gmail.com"}],"homepage":"https://github.com/bunpressjs/bunpress#readme","bugs":{"url":"https://github.com/bunpressjs/bunpress/issues"},"dist":{"shasum":"c9df7d140580ddfc5a34c7111815458e0c1a7660","tarball":"https://registry.npmjs.org/@bunpressjs/bunpress/-/bunpress-0.1.0.tgz","fileCount":3,"integrity":"sha512-uOdU/Tuflf1vcmwoimiTGVJvzH/gcUcsb6KOO9H1tVcKoVbqCpNxHuN+tf/g0bsGSyo6D72vlDH+IDLzXKOUfw==","signatures":[{"sig":"MEUCIF3AHtrBTxTgVUmYaI2WaA9XbpqSo/KclHEuIwdGicdAAiEA1mm5g6Bc/Lw+d7sJQ3rfnvllIer2j8Lf5SnpEFA7Nww=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7372},"mail":"abhinayambati4@gmail.com","main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"0f96b8241c0540603c22297da6fa780cb7198345","scripts":{"dev":"bun run examples/errors.ts","test":"bun test","build":"tsc"},"_npmUser":{"name":"abhinay_ambati","email":"abhinayambati4@gmail.com"},"repository":{"url":"git+https://github.com/bunpressjs/bunpress.git","type":"git"},"_npmVersion":"11.5.2","description":"⚡ Lightweight Express-style web framework built for the Bun runtime.","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bunpress_0.1.0_1762497874072_0.8378443142592868","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bunpressjs/bunpress","version":"0.1.1","keywords":["bun","framework","express","middleware","router","server"],"author":{"name":"Abhinay Ambati"},"license":"MIT","_id":"@bunpressjs/bunpress@0.1.1","maintainers":[{"name":"abhinay_ambati","email":"abhinayambati4@gmail.com"}],"homepage":"https://github.com/AbhinaAmbati/bunpress#readme","bugs":{"url":"https://github.com/AbhinaAmbati/bunpress/issues"},"dist":{"shasum":"ee01aec9efe0b5fd0380c9c100963a83536b47e1","tarball":"https://registry.npmjs.org/@bunpressjs/bunpress/-/bunpress-0.1.1.tgz","fileCount":23,"integrity":"sha512-VznqvZLYPZpLm/OsSTIVxAw5GzY5CX6N2K0/vCDNp0DF4spz1txWpkTLmfA5+BxOFy9+qz9YDUoaDBEXw1QXpQ==","signatures":[{"sig":"MEYCIQDNL0aqZcSmjau1zV1tENElBOr2HjaUs0y+U8Zd//TXhQIhAJfTRRs8F/8VhIVnefueOQODfQo+NIu9xF2jiUF0FSFZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18345},"mail":"abhinayambati4@gmail.com","main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"2a7c708f2b3a0f67f56fbc9fc00044bd49ca5aec","scripts":{"dev":"bun run examples/errors.ts","test":"bun test","build":"tsc"},"_npmUser":{"name":"abhinay_ambati","email":"abhinayambati4@gmail.com"},"repository":{"url":"git+https://github.com/AbhinaAmbati/bunpress.git","type":"git"},"_npmVersion":"11.5.2","description":"⚡ Lightweight Express-style web framework built for the Bun runtime.","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bunpress_0.1.1_1762498198727_0.333147958205001","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bunpressjs/bunpress","version":"0.1.2","description":"⚡ Lightweight Express-style web framework built for the Bun runtime.","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"bun run examples/errors.ts","build":"tsc","test":"bun test"},"keywords":["bun","framework","express","middleware","router","server"],"author":{"name":"Abhinay Ambati"},"mail":"abhinayambati4@gmail.com","license":"MIT","repository":{"type":"git","url":"git+https://github.com/AbhinayAmbati/bunpress.git"},"bugs":{"url":"https://github.com/AbhinayAmbati/bunpress/issues"},"homepage":"https://github.com/AbhinayAmbati/bunpress#readme","_id":"@bunpressjs/bunpress@0.1.2","gitHead":"8926485c928fb8c79857ae10d1897f283e808dca","_nodeVersion":"22.19.0","_npmVersion":"11.5.2","dist":{"integrity":"sha512-RirdJbOTSrGpQmMFOebnwKpKcUpJyVl3yBtOGB68BmOuOm+/FmlIuE2yeeyPczcAOQxurOVFxIXQrxCAu9lUMg==","shasum":"f1cd205115fa8af3ce5770c426fa5199c8251e08","tarball":"https://registry.npmjs.org/@bunpressjs/bunpress/-/bunpress-0.1.2.tgz","fileCount":23,"unpackedSize":18348,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCHWhCt1acNPuiajSOk4S83n1NZkOi8h8TWGdu1jsqzowIgKvwtGBby+1uhJUF2OB715DV0Gjlpj9/nmnkGhTavKM0="}]},"_npmUser":{"name":"abhinay_ambati","email":"abhinayambati4@gmail.com"},"directories":{},"maintainers":[{"name":"abhinay_ambati","email":"abhinayambati4@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bunpress_0.1.2_1762498439936_0.6746714047561262"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-07T06:44:33.988Z","modified":"2025-11-07T06:54:00.379Z","0.1.0":"2025-11-07T06:44:34.256Z","0.1.1":"2025-11-07T06:49:58.964Z","0.1.2":"2025-11-07T06:54:00.151Z"},"bugs":{"url":"https://github.com/AbhinayAmbati/bunpress/issues"},"author":{"name":"Abhinay Ambati"},"license":"MIT","homepage":"https://github.com/AbhinayAmbati/bunpress#readme","keywords":["bun","framework","express","middleware","router","server"],"repository":{"type":"git","url":"git+https://github.com/AbhinayAmbati/bunpress.git"},"description":"⚡ Lightweight Express-style web framework built for the Bun runtime.","maintainers":[{"name":"abhinay_ambati","email":"abhinayambati4@gmail.com"}],"readme":"# Bunpress 🚀\r\n\r\nA lightweight, Express.js-inspired web framework built specifically for **Bun** - the fast all-in-one JavaScript runtime.\r\n\r\n## Features\r\n\r\n- 🚀 **Fast**: Built on top of Bun's native HTTP server\r\n- 🪶 **Lightweight**: Minimal footprint with zero dependencies\r\n- 🔧 **Simple**: Express.js-like API that's familiar and easy to use\r\n- ⚡ **TypeScript**: Full TypeScript support out of the box\r\n- 🎯 **Modern**: Uses modern JavaScript features and Web APIs\r\n\r\n## Installation\r\n\r\nMake sure you have [Bun](https://bun.sh) installed on your system.\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone <repository-url>\r\ncd bunpress\r\n\r\n# Install dependencies\r\nbun install\r\n```\r\n\r\n## Quick Start\r\n\r\nHere's a simple example to get you started:\r\n\r\n```typescript\r\nimport { Bunpress } from \"./src\";\r\n\r\nconst app = new Bunpress();\r\n\r\n// Define routes\r\napp.get(\"/\", () => new Response(\"Hello from Bunpress!\"));\r\n\r\napp.get(\"/user\", () =>\r\n  new Response(JSON.stringify({ name: \"Abhinay\", role: \"creator\" }), {\r\n    headers: { \"Content-Type\": \"application/json\" },\r\n  })\r\n);\r\n\r\n// Start the server\r\napp.listen(3000);\r\n```\r\n\r\n## API Reference\r\n\r\n### Creating an App\r\n\r\n```typescript\r\nimport { Bunpress } from \"bunpress\";\r\n\r\nconst app = new Bunpress();\r\n```\r\n\r\n### Route Methods\r\n\r\nCurrently supported HTTP methods:\r\n\r\n#### GET Routes\r\n```typescript\r\napp.get(path: string, handler: Handler)\r\n```\r\n\r\n#### POST Routes\r\n```typescript\r\napp.post(path: string, handler: Handler)\r\n```\r\n\r\n### Handler Function\r\n\r\nA handler function receives a `Request` object and should return a `Response` or a `Promise<Response>`:\r\n\r\n```typescript\r\ntype Handler = (req: Request) => Response | Promise<Response>;\r\n```\r\n\r\n### Starting the Server\r\n\r\n```typescript\r\napp.listen(port: number)\r\n```\r\n\r\nStarts the server on the specified port and returns a Bun server instance.\r\n\r\n## Examples\r\n\r\n### Basic Server\r\n\r\n```typescript\r\nimport { Bunpress } from \"./src\";\r\n\r\nconst app = new Bunpress();\r\n\r\napp.get(\"/\", () => new Response(\"Hello World!\"));\r\n\r\napp.listen(3000);\r\nconsole.log(\"Server running on http://localhost:3000\");\r\n```\r\n\r\n### JSON API\r\n\r\n```typescript\r\nimport { Bunpress } from \"./src\";\r\n\r\nconst app = new Bunpress();\r\n\r\napp.get(\"/api/users\", () => {\r\n  const users = [\r\n    { id: 1, name: \"John Doe\" },\r\n    { id: 2, name: \"Jane Smith\" }\r\n  ];\r\n  \r\n  return new Response(JSON.stringify(users), {\r\n    headers: { \"Content-Type\": \"application/json\" }\r\n  });\r\n});\r\n\r\napp.post(\"/api/users\", async (req) => {\r\n  const body = await req.json();\r\n  console.log(\"New user:\", body);\r\n  \r\n  return new Response(JSON.stringify({ success: true }), {\r\n    headers: { \"Content-Type\": \"application/json\" },\r\n    status: 201\r\n  });\r\n});\r\n\r\napp.listen(3000);\r\n```\r\n\r\n## Project Structure\r\n\r\n```\r\nbunpress/\r\n├── src/\r\n│   ├── index.ts          # Main export\r\n│   ├── core/\r\n│   │   ├── app.ts        # Main Bunpress class\r\n│   │   ├── middleware.ts # Middleware system (planned)\r\n│   │   ├── response.ts   # Response utilities (planned)\r\n│   │   └── router.ts     # Advanced routing (planned)\r\n│   └── utils/\r\n│       ├── helper.ts     # Utility functions (planned)\r\n│       └── mime.ts       # MIME type handling (planned)\r\n├── examples/\r\n│   ├── basic.ts          # Basic usage example\r\n│   ├── middleware.ts     # Middleware example (planned)\r\n│   └── routing.ts        # Advanced routing example (planned)\r\n├── tests/\r\n│   └── server.test.ts    # Test files (planned)\r\n├── package.json\r\n├── tsconfig.json\r\n└── bunfig.toml\r\n```\r\n\r\n## Development\r\n\r\n### Running Examples\r\n\r\n```bash\r\n# Run the basic example\r\nbun run examples/basic.ts\r\n\r\n# The server will start on http://localhost:3000\r\n```\r\n\r\n### Running Tests\r\n\r\n```bash\r\nbun test\r\n```\r\n\r\n## Roadmap\r\n\r\n### Planned Features\r\n\r\n- [ ] **Middleware Support**: Add middleware system for request/response processing\r\n- [ ] **Advanced Routing**: Path parameters, wildcards, and route groups  \r\n- [ ] **Static File Serving**: Built-in static file middleware\r\n- [ ] **Request Parsing**: Built-in JSON, form data, and multipart parsing\r\n- [ ] **Response Helpers**: Convenient methods for common response types\r\n- [ ] **Error Handling**: Global error handling and custom error pages\r\n- [ ] **CORS Support**: Cross-origin resource sharing middleware\r\n- [ ] **Rate Limiting**: Built-in rate limiting capabilities\r\n- [ ] **Logging**: Request/response logging middleware\r\n- [ ] **WebSocket Support**: Real-time communication support\r\n\r\n### HTTP Methods to Add\r\n\r\n- [ ] PUT\r\n- [ ] DELETE  \r\n- [ ] PATCH\r\n- [ ] HEAD\r\n- [ ] OPTIONS\r\n\r\n## Contributing\r\n\r\n1. Fork the repository\r\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\r\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\r\n4. Push to the branch (`git push origin feature/amazing-feature`)\r\n5. Open a Pull Request\r\n\r\n## Requirements\r\n\r\n- **Bun** 1.0 or higher\r\n- **TypeScript** 5.0 or higher\r\n\r\n## License\r\n\r\nThis project is open source and available under the [MIT License](LICENSE).\r\n\r\n## Acknowledgments\r\n\r\n- Inspired by [Express.js](https://expressjs.com/)\r\n- Built for the [Bun](https://bun.sh) runtime\r\n- Created by Abhinay Ambati\r\n\r\n---\r\n\r\n**Note**: Bunpress is currently in early development. Many features are planned but not yet implemented. Check the roadmap above for upcoming features.","readmeFilename":"Readme.md"}