{"id":17857185,"url":"https://github.com/caferrari/express-typed-router","last_synced_at":"2025-04-02T18:21:51.021Z","repository":{"id":232847575,"uuid":"640032751","full_name":"caferrari/express-typed-router","owner":"caferrari","description":"A router wrapper with validation and consistent types for express","archived":false,"fork":false,"pushed_at":"2023-05-12T20:13:53.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T08:47:36.581Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caferrari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-12T20:12:57.000Z","updated_at":"2023-05-12T22:31:42.000Z","dependencies_parsed_at":"2024-04-11T21:49:22.960Z","dependency_job_id":null,"html_url":"https://github.com/caferrari/express-typed-router","commit_stats":null,"previous_names":["caferrari/express-typed-router"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2Fexpress-typed-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2Fexpress-typed-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2Fexpress-typed-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caferrari%2Fexpress-typed-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caferrari","download_url":"https://codeload.github.com/caferrari/express-typed-router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246866198,"owners_count":20846525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T03:11:49.050Z","updated_at":"2025-04-02T18:21:50.992Z","avatar_url":"https://github.com/caferrari.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create a fully typed router to use with Express\n\n\n## Sample\n\n```typescript:\nimport { Router } from 'express';\nimport * as jwt from 'jsonwebtoken';\nimport { z } from 'zod';\n\nimport { NiceRouter } from 'express-typed-router';\n\nconst router = NiceRouter(Router());\n\nrouter.post(\n  '/login',\n  {\n    body: z.object({ username: z.string(), password: z.string() }),\n  },\n  async (req, res) =\u003e {\n\n    // yout authentication logic\n\n    const token = jwt.sign({ \n      user: req.body.username \n    }, 'my secret', {\n      expiresIn: '1 day',\n      algorithm: 'HS256',\n    });\n\n    res.json({\n      token,\n    });\n  }\n);\n\nexport const authRouter = router.toExpress();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaferrari%2Fexpress-typed-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaferrari%2Fexpress-typed-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaferrari%2Fexpress-typed-router/lists"}