{"id":14970034,"url":"https://github.com/mastilver/express-annotation","last_synced_at":"2025-08-01T19:05:30.146Z","repository":{"id":28274578,"uuid":"31785047","full_name":"mastilver/express-annotation","owner":"mastilver","description":"Bring annotation routing to express","archived":false,"fork":false,"pushed_at":"2016-12-23T12:59:31.000Z","size":8,"stargazers_count":25,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-09T04:48:40.327Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mastilver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-06T19:22:33.000Z","updated_at":"2017-05-04T06:48:04.000Z","dependencies_parsed_at":"2022-07-08T11:01:34.421Z","dependency_job_id":null,"html_url":"https://github.com/mastilver/express-annotation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mastilver/express-annotation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastilver%2Fexpress-annotation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastilver%2Fexpress-annotation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastilver%2Fexpress-annotation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastilver%2Fexpress-annotation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mastilver","download_url":"https://codeload.github.com/mastilver/express-annotation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastilver%2Fexpress-annotation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268281821,"owners_count":24225159,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-09-24T13:42:55.787Z","updated_at":"2025-08-01T19:05:29.992Z","avatar_url":"https://github.com/mastilver.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# express-annotation [![Build Status](https://travis-ci.org/mastilver/express-annotation.svg?branch=master)](https://travis-ci.org/mastilver/express-annotation) [![Coverage Status](https://coveralls.io/repos/mastilver/express-annotation/badge.svg?branch=master)](https://coveralls.io/r/mastilver/express-annotation?branch=master)\n\n\n\u003e Bring annotation routing to [expressJs](https://github.com/strongloop/express)\n\n\n## Install\n\n`$ npm install --save express-annotation`\n\n## Usage\n\ngiven a file `/controllers/user.js`:\n\n```\n\n// @route('/users')\nmodule.exports.getAll = function(req, res){\n\n};\n\n// @route('/users/:id')\nmodule.exports.get = function(req, res){\n    console.log(req.params.id);\n};\n\n// @httpPut()\n// @route('/users/:id')\nmodule.exports.update = function(req, res){\n\n};\n\n```\n\nyou can register those routes by writing so:\n\n```\n\nvar expressAnnotation = require('express-annotation');\nvar app = require('express')();\n\nexpressAnnotation(app, 'controllers/**/*.js', function(err){\n\n    // routes have been added to the express instance\n\n    app.listen(3030);\n});\n\n```\n\n## API\n\n### expressAnnotation(expressInstance, paths, callback)\n\n#### expressInstance\n\n*required*  \n\u003e express instance (value returned by: `express()`)\n\n#### paths\n\n*required*  \nType: `array`, `string`\n\n#### callback(err)\n\nType: `Function`  \n\u003e will be called when all the routes have been added to the express instance\n\n\n### [Annotations / Decorators API](https://github.com/mastilver/node-annotation-router#annotations-api)\n\n\n## Licence\n\nMIT © Thomas Sileghem\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastilver%2Fexpress-annotation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastilver%2Fexpress-annotation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastilver%2Fexpress-annotation/lists"}