{"id":20718409,"url":"https://github.com/neerajkumar161/node-js-framework","last_synced_at":"2026-04-24T10:05:14.862Z","repository":{"id":172984761,"uuid":"649281052","full_name":"neerajkumar161/node-js-framework","owner":"neerajkumar161","description":"A lightweight, minimal Node.js framework similar to Express","archived":false,"fork":false,"pushed_at":"2023-06-06T09:00:56.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-11T07:46:33.181Z","etag":null,"topics":["framework","library","nodejs","open-source","pnpm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/neerajkumar161.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,"publiccode":null,"codemeta":null}},"created_at":"2023-06-04T11:16:17.000Z","updated_at":"2023-10-18T17:41:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"6dcb4eca-577d-4cb8-a5d8-31027453156c","html_url":"https://github.com/neerajkumar161/node-js-framework","commit_stats":null,"previous_names":["neerajkumar161/node-js-framework"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/neerajkumar161/node-js-framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neerajkumar161%2Fnode-js-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neerajkumar161%2Fnode-js-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neerajkumar161%2Fnode-js-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neerajkumar161%2Fnode-js-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neerajkumar161","download_url":"https://codeload.github.com/neerajkumar161/node-js-framework/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neerajkumar161%2Fnode-js-framework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32218297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T09:47:08.147Z","status":"ssl_error","status_checked_at":"2026-04-24T09:46:41.165Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["framework","library","nodejs","open-source","pnpm","typescript"],"created_at":"2024-11-17T03:13:39.891Z","updated_at":"2026-04-24T10:05:14.856Z","avatar_url":"https://github.com/neerajkumar161.png","language":"TypeScript","readme":"# Nodejs-Framework\n\nThis is a lightweight, minimal and custom [Express](https://github.com/expressjs/express)-like library implemented in TypeScript, without any additional libraries, providing basic functionality for building web applications.\n\n## Features\n\n- Middleware support for handling HTTP requests\n- Routing based on URL and HTTP method\n- Error handling middleware\n- Built-in server using the Node.js `http` module\n\n## Installation\n\nTo use the library in your project, you can install it via npm. Run the following command:\n\n```shell\nnpm install nodejs-framework    // NOT uploaded yet\n```\n\n## Usage\nImport the library and create an instance of the App class:\n\n```ts\nimport App from './';\n\nconst app = new App();\n\napp.listen(3400, () =\u003e {\n  console.log('Server is listening on port 3400!')\n})\n```\n\n## Middleware\nYou can register middleware functions to be executed for every request using the app.use method:\n\n```ts\napp.use('/health', (req, res) =\u003e {\n  console.log(req.url)\n  res.end('Server is working fine!!!')\n})\n```\n\n## Route Handlers\nDefine route handlers using the app.get and app.post methods:\n\n```ts\napp.get('/getRoute', (req, res) =\u003e {\n  console.log('Im in getRoute', req.body)\n  res.end('Im in getRoute')\n})\n\napp.post('/postRoute', (req, res) =\u003e {\n  console.log('PostRoute', req.body)\n  res.end('PostRoute')\n})\n```\n## API Reference\n\n### \n\n```ts\napp.use(route: string, handler: RequestHandler): void\n```\n\nRegisters middleware to be executed for all requests or for a specific route.\n\n- `route` (required): The route URL for the middleware. If not provided, it will be registered for all routes.\n- `handler`: The middleware function.\n\n### \n```ts\napp.get(route: string, handler: RequestHandler): void\n```\n\nRegisters a route handler for HTTP GET requests.\n\n- `route`: The route URL pattern.\n- `handler`: The route handler function.\n\n### \n```ts\napp.post(route: string, handler: RequestHandler): void\n```\n\nRegisters a route handler for HTTP POST requests.\n\n- `route`: The route URL pattern.\n- `handler`: The route handler function.\n\n### \n```ts\napp.listen(port: number, callback?: () =\u003e void): void\n```\n\nStarts the server and listens for incoming requests on the specified port.\n\n- `port`: The port number to listen on.\n- `callback` (optional): A function to be called when the server starts listening.\n\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Author\n[Neeraj Kumar](https://www.github.com/neerajkumar161)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneerajkumar161%2Fnode-js-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneerajkumar161%2Fnode-js-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneerajkumar161%2Fnode-js-framework/lists"}