{"_id":"@boilpress-router-beta/express","_rev":"4-9af534557b30cb8634e1a8ccee03e939","name":"@boilpress-router-beta/express","dist-tags":{"latest":"2.1.2"},"versions":{"1.2.4":{"name":"@boilpress-router-beta/express","version":"1.2.4","keywords":[],"author":"","license":"ISC","_id":"@boilpress-router-beta/express@1.2.4","maintainers":[{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"}],"dist":{"shasum":"81668326bf150bab4a3ab518abee19db764e1beb","tarball":"https://registry.npmjs.org/@boilpress-router-beta/express/-/express-1.2.4.tgz","fileCount":31,"integrity":"sha512-CYgujopETRWTpPKjXQsCwPHB7JNWdqFC4CW4DwdMcPrmV7+fvChTvQWpBPXn+o7uAyiEwO/gx6mvNkSOjgJT4A==","signatures":[{"sig":"MEQCIGsiM4FSfvEyVuGu8LbsslUCb3USVPX5t7Up6+DzTYj6AiAsnBFVson/Vg6gqiLtONIGlys1uO4A9fYVTzoIZqVZSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16564},"main":"dist/index.js","_from":"file:boilpress-router-beta-express-1.2.4.tgz","types":"./dist/index.d.ts","scripts":{"dev":"ts-node src/index.ts","lint":"eslint 'src/**/*.{ts,tsx}' --fix","build":"tsc","clean":"rimraf dist","format":"prettier --write 'src/**/*.{ts,tsx}'"},"_npmUser":{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"},"_resolved":"C:\\Users\\91841\\AppData\\Local\\Temp\\28c29e078c1d3ed913c47fadcda4dfd1\\boilpress-router-beta-express-1.2.4.tgz","_integrity":"sha512-CYgujopETRWTpPKjXQsCwPHB7JNWdqFC4CW4DwdMcPrmV7+fvChTvQWpBPXn+o7uAyiEwO/gx6mvNkSOjgJT4A==","_npmVersion":"10.8.1","description":"NextJS like routing for express (beta)","directories":{},"_nodeVersion":"20.16.0","dependencies":{"express":"^4.21.0"},"_hasShrinkwrap":false,"devDependencies":{"jiti":"^1.21.6","eslint":"^9.10.0","rimraf":"^6.0.1","ts-node":"^10.9.2","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.4","@types/express":"^4.17.21","@typescript-eslint/parser":"^8.5.0","@typescript-eslint/eslint-plugin":"^8.5.0"},"_npmOperationalInternal":{"tmp":"tmp/express_1.2.4_1726291042564_0.5069894533376216","host":"s3://npm-registry-packages"}},"1.2.5":{"name":"@boilpress-router-beta/express","version":"1.2.5","keywords":[],"author":"","license":"ISC","_id":"@boilpress-router-beta/express@1.2.5","maintainers":[{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"}],"dist":{"shasum":"a8978cf42a117e0ac617e3624435a8d990af98e5","tarball":"https://registry.npmjs.org/@boilpress-router-beta/express/-/express-1.2.5.tgz","fileCount":31,"integrity":"sha512-KGCiw81/M1cNpFZL9fJvK41vZHVnoGRLqEzyq0RSo8DzF9gpuuqBuzNJXf+/8PYpPPVlJ0v04KYzXozEcOh+sw==","signatures":[{"sig":"MEUCIQCeBkr+xu1HUkYg4K6NnR3QYQ+VjGsVeBddlA/aXPLpWgIgaz1Msw7Gbe3y8uwUH9l3JtDrhoEulVbIe48hAdC4Dhg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21204},"main":"dist/index.js","types":"./dist/index.d.ts","scripts":{"dev":"ts-node src/index.ts","lint":"eslint 'src/**/*.{ts,tsx}' --fix","build":"tsc","clean":"rimraf dist","format":"prettier --write 'src/**/*.{ts,tsx}'","prepublishOnly":"pnpm run clean && pnpm run build"},"_npmUser":{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"},"_npmVersion":"10.8.1","description":"NextJS like routing for express (beta)","directories":{},"_nodeVersion":"20.16.0","dependencies":{"express":"^4.21.0"},"_hasShrinkwrap":false,"devDependencies":{"jiti":"^1.21.6","eslint":"^9.10.0","rimraf":"^6.0.1","ts-node":"^10.9.2","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.4","@types/express":"^4.17.21","@typescript-eslint/parser":"^8.5.0","@typescript-eslint/eslint-plugin":"^8.5.0"},"_npmOperationalInternal":{"tmp":"tmp/express_1.2.5_1726403698881_0.24699538229945572","host":"s3://npm-registry-packages"}},"1.9.9":{"name":"@boilpress-router-beta/express","version":"1.9.9","keywords":[],"author":"","license":"ISC","_id":"@boilpress-router-beta/express@1.9.9","maintainers":[{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"}],"dist":{"shasum":"e5dd3eadf3c0d50f5f1743a657b49792d728a5da","tarball":"https://registry.npmjs.org/@boilpress-router-beta/express/-/express-1.9.9.tgz","fileCount":3,"integrity":"sha512-lMOIIwL715Bz94ZQRMntMCTQlrCdwXUr7hbCGa5oaIlxouReB63lGNC2bNSEN0QWramDxuIw6VA9rUQuTLeJ1g==","signatures":[{"sig":"MEUCIQDouz82TyCj425r1KoxI7frlcw/OfzHM7b2paILmJgh9QIgKO3ocVL73ySM3trsFmTl+hxOafRAztapRJX22RHbtmk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3984},"main":"dist/index.js","types":"./dist/index.d.ts","scripts":{"dev":"ts-node src/index.ts","lint":"eslint 'src/**/*.{ts,tsx}' --fix","build":"tsc","clean":"rimraf dist","format":"prettier --write 'src/**/*.{ts,tsx}'","publishOnly":"npm run build && cp -r dist/ ./","prepublishOnly":"pnpm run clean && pnpm run build"},"_npmUser":{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"},"_npmVersion":"10.8.1","description":"NextJS like routing for express (beta)","directories":{},"_nodeVersion":"20.16.0","dependencies":{"express":"^4.21.0"},"_hasShrinkwrap":false,"devDependencies":{"jiti":"^1.21.6","eslint":"^9.10.0","rimraf":"^6.0.1","ts-node":"^10.9.2","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.4","@types/express":"^4.17.21","@typescript-eslint/parser":"^8.5.0","@typescript-eslint/eslint-plugin":"^8.5.0"},"_npmOperationalInternal":{"tmp":"tmp/express_1.9.9_1726404187948_0.9611374292112014","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@boilpress-router-beta/express","version":"2.0.0","keywords":[],"author":"","license":"ISC","_id":"@boilpress-router-beta/express@2.0.0","maintainers":[{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"}],"dist":{"shasum":"a1e78e40c02ebe59794e23fe0eb3f81db7d1b361","tarball":"https://registry.npmjs.org/@boilpress-router-beta/express/-/express-2.0.0.tgz","fileCount":3,"integrity":"sha512-sAHW8Scye8TCudWrWv4DLqaQEe8vhEAnnkkVlgE/g4j1izH8ud1Ngs3EGnuF6WftwxJYJklSsEZ1kS4TsxyKLw==","signatures":[{"sig":"MEYCIQDz4fhx66uqJF7JQBhBeNiAXEO1BH8XWoMevM7hLzH0MQIhAKZys3NbVxZTsIS7kVMfhg1ZkXfsj4dQmuFTp8edvR6k","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11037},"main":"dist/index.js","types":"./dist/index.d.ts","scripts":{"lint":"eslint 'src/**/*.{ts,tsx}' --fix","build":"tsup","clean":"rimraf dist","format":"prettier --write 'src/**/*.{ts,tsx}'","prepublishOnly":"pnpm run clean && pnpm run build"},"_npmUser":{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"},"_npmVersion":"10.8.1","description":"NextJS like routing for express (beta)","directories":{},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","eslint":"^9.10.0","rimraf":"^6.0.1","express":"^4.21.0","prettier":"^3.3.3","@swc/core":"^1.7.26","typescript":"^5.6.2","@types/node":"^22.5.5","@types/express":"^4.17.21","@typescript-eslint/parser":"^8.5.0","@typescript-eslint/eslint-plugin":"^8.5.0"},"_npmOperationalInternal":{"tmp":"tmp/express_2.0.0_1726413523184_0.9008539182086419","host":"s3://npm-registry-packages"}},"2.1.2":{"name":"@boilpress-router-beta/express","version":"2.1.2","description":"NextJS like routing for express (beta)","main":"dist/index.js","scripts":{"build":"tsup","clean":"rimraf dist","format":"prettier --write 'src/**/*.{ts,tsx}'","lint":"eslint 'src/**/*.{ts,tsx}' --fix"},"keywords":[],"author":"","license":"ISC","devDependencies":{"@swc/core":"^1.7.26","@types/express":"^4.17.21","@types/node":"^22.5.5","@typescript-eslint/eslint-plugin":"^8.5.0","@typescript-eslint/parser":"^8.5.0","eslint":"^9.10.0","express":"^4.21.0","prettier":"^3.3.3","rimraf":"^6.0.1","tsup":"^8.2.4","typescript":"^5.6.2"},"_id":"@boilpress-router-beta/express@2.1.2","gitHead":"f8dd73666522b0fcd194854ad2c9a10175b0973f","types":"./dist/index.d.ts","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-raIVk8yuaWaqETq1nXMrjG4ndBKgI8KSd9B++UVIZ0N5XjWHbJAz2Dakko223OYwyMYuom99qsqCCRPY1aOMbw==","shasum":"53b255746ad35c1c0495bcf0a196a178ab4bd22c","tarball":"https://registry.npmjs.org/@boilpress-router-beta/express/-/express-2.1.2.tgz","fileCount":3,"unpackedSize":11313,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICticiEk5qHdMXwy+J8/PjmkHKHeGxSjtq8O39N0EoVUAiA4K8hBgW6AZX+nw+pV4Y2ESTMEoUDmx+BFvYSp0Ccr8g=="}]},"_npmUser":{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"},"directories":{},"maintainers":[{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_2.1.2_1726752766109_0.18342471935883276"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-14T05:17:22.469Z","modified":"2024-09-19T13:32:46.436Z","1.2.4":"2024-09-14T05:17:23.193Z","1.2.5":"2024-09-15T12:34:59.022Z","1.9.9":"2024-09-15T12:43:08.090Z","2.0.0":"2024-09-15T15:18:43.336Z","2.1.2":"2024-09-19T13:32:46.250Z"},"license":"ISC","keywords":[],"description":"NextJS like routing for express (beta)","maintainers":[{"name":"ee3dev","email":"mhapsekarpooja1@gmail.com"}],"readme":"# Boilpress Router Beta (express)\r\n\r\n## Overview\r\n\r\nThis project demonstrates the usage of the `@boilpress-router-beta/express` library with Express.js to set up routing in a TypeScript-based application you can use it with javascript too just change the code accordingly.\r\n\r\n## Setup\r\n\r\n### Installation\r\n\r\nFirst, ensure you have the necessary dependencies installed. If not, you can install them using npm or pnpm:\r\n\r\n```bash\r\npnpm add express @boilpress-router-beta/express\r\n```\r\n\r\n## File Structure\r\n\r\nYou can put your routes in any folder you want, but for this example, we'll put them in a `src/routes` folder.\r\n\r\n- `src/routes/` - Contains route handlers for your application.\r\n- `src/routes/index.ts` - Handles the root route (`/`).\r\n- `src/routes/hi/index.ts` - Handles the `/hi` route.\r\n- `src/routes/users/[id].ts` - Handles dynamic routing for `/users/:id`.\r\n\r\n## Usage\r\n`index.ts`\r\nThis is the entry point of your application.\r\n\r\n```javascript\r\nimport { boilpressRouter } from \"@boilpress-router-beta/express\";\r\nimport express from \"express\";\r\n\r\nconst app = express();\r\nconst PORT = 8000;\r\n\r\nboilpressRouter(app, {\r\n    path: \"src/routes\" // Path to your routes folder. If you don't have a 'src' folder, just use 'routes' or whatever your folder is named.\r\n});\r\n\r\napp.listen(PORT, () => {\r\n    console.log(`Server is running on port ${PORT}`);\r\n});\r\n```\r\n## Route Handlers\r\n\r\n`src/routes/index.ts`\r\nHandles the root route `(/)`.\r\n\r\n```javascript\r\nimport { Request, Response } from 'express';\r\n\r\nexport function GET(req: Request, res: Response): void {\r\n    res.send(\"Hello from the index route!\");\r\n}\r\n```\r\n\r\n`src/routes/hi/index.ts`\r\nHandles the `/hi` route.\r\n\r\n```javascript\r\nimport { Request, Response } from 'express';\r\n\r\nexport function GET(req: Request, res: Response): void {\r\n    res.send(\"Hello from the hi route!\");\r\n}\r\n```\r\n\r\n`src/routes/users/[id].ts`\r\nHandles dynamic routing for `/users/:id`.\r\n\r\n```javascript\r\nimport { Request, Response, NextFunction } from 'express';\r\n\r\nexport function GET(req: Request, res: Response, next: NextFunction): void {\r\n    const { id } = req.params;\r\n    res.send(`User ID: ${id}`);\r\n}\r\n```\r\n## Notes\r\n- You can create nested routes by creating folders inside the `routes` folder.\r\n- You can also create a `[id].ts` file to handle dynamic routing for `/users/:id`.\r\n- Remember for now, if you have any file that ends with `.ts`, `.js`, `.cjs` or `.mjs`, it will be treated as a route please let me know if i should change it with something like `route.ts` or something else.\r\n\r\nThis is a utility library for my other project called boilpress (under development).\r\n\r\n## Contributing\r\n\r\nThis project is open-source, so like... please help me out. I legit can't handle this shit on my own 😭🙏.\r\n\r\n## Contact \r\n\r\nIf you need to ask something or drop some feedback, just hit me up on Discord: @iee3dev or Twitter: @ee3dev. And come join my Discord server before I start talking to myself! (I need friends 😭)\r\n- [Discord Server](https://discord.gg/VbrtYa2x9M)\r\n- [Twitter](https://twitter.com/ee3dev)\r\n","readmeFilename":"readme.md"}