{"id":15470594,"url":"https://github.com/integeralex/hasty-server","last_synced_at":"2025-08-09T00:03:32.585Z","repository":{"id":257804131,"uuid":"859924266","full_name":"IntegerAlex/hasty-server","owner":"IntegerAlex","description":"Hasty-Server is a lightweight fully featured web framework with zero dependencies ","archived":false,"fork":false,"pushed_at":"2025-03-05T06:59:42.000Z","size":6152,"stargazers_count":14,"open_issues_count":24,"forks_count":25,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T04:12:11.167Z","etag":null,"topics":["collaborate","hacktoberfest","hacktoberfest-accepted","javascript","javascript-framework","javascript-library","npm","webframework","webserver"],"latest_commit_sha":null,"homepage":"https://hasty-server.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IntegerAlex.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":["IntegerAlex"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2024-09-19T14:10:32.000Z","updated_at":"2025-04-06T16:20:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"8fb33d33-0fb5-48b4-aa65-845acfe425c3","html_url":"https://github.com/IntegerAlex/hasty-server","commit_stats":{"total_commits":52,"total_committers":9,"mean_commits":5.777777777777778,"dds":"0.34615384615384615","last_synced_commit":"9b5de20653ee004c68ea34c7fc1be3e0c54c6fc9"},"previous_names":["integeralex/hasty-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntegerAlex%2Fhasty-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntegerAlex%2Fhasty-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntegerAlex%2Fhasty-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntegerAlex%2Fhasty-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IntegerAlex","download_url":"https://codeload.github.com/IntegerAlex/hasty-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142908,"owners_count":21054672,"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":["collaborate","hacktoberfest","hacktoberfest-accepted","javascript","javascript-framework","javascript-library","npm","webframework","webserver"],"created_at":"2024-10-02T02:05:42.048Z","updated_at":"2025-08-09T00:03:32.500Z","avatar_url":"https://github.com/IntegerAlex.png","language":"JavaScript","funding_links":["https://github.com/sponsors/IntegerAlex"],"categories":[],"sub_categories":[],"readme":"# Hasty \n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/IntegerAlex/hasty-server/badge)](https://scorecard.dev/viewer/?uri=github.com/IntegerAlex/hasty-server)\n![NPM Version](https://img.shields.io/npm/v/hasty-server)\n![NPM Downloads](https://img.shields.io/npm/d18m/hasty-server)\n![NPM License](https://img.shields.io/npm/l/hasty-server)\n \n**Help needed**: I am looking for contributors to help me with this project. If you are interested, please let me know.\n\nHasty server is a simple web framework to build webserver  in a simple way. It is inspired by [Express.js](https://expressjs.com/).\nBascially, It is my implementation of HTTP using raw TCP Socket in Javascript.\n\n###  table of contents\n- [Installation](#installation)\n- [Module Support](#module-support)\n- [Usage](#usage)\n- [Request Object](#request-object)\n- [Contributing](#contributing)\n- [CHANGELOG](CHANGELOG.md)\n- [LICENSE](LICENSE.md)\n\n\n### Note\n\nThis is a work in progress and not ready for production. It is just a fun project to learn how HTTP works under the hood.\n\n### Installation\n```bash\nnpm install hasty-server\n```\n\n### Module Support\n\nHasty Server supports multiple module systems for maximum compatibility:\n\n#### ✅ CommonJS (Default)\n\n```javascript\nconst Hasty = require('hasty-server');\nconst server = new Hasty();\n```\n\n#### ✅ ES Modules (ESM)\n\n```javascript\nimport Hasty from 'hasty-server';\nconst server = new Hasty();\n```\n\n#### ✅ TypeScript\n\n```typescript\nimport Hasty, { Request, Response } from 'hasty-server';\n\nconst server = new Hasty();\n\nserver.get('/', (req: Request, res: Response) =\u003e {\n    res.json({ message: 'Hello from TypeScript!' });\n});\n```\n\n#### ✅ Dual Package Support\n\nThe framework automatically detects your module system and provides the appropriate format:\n\n- **CommonJS projects**: Uses `.js` files\n- **ESM projects**: Uses `.mjs` files  \n- **TypeScript projects**: Uses `.d.ts` type definitions\n\n### Usage  \n\n**Common JS**\n\n```Javascript\nconst Hasty = require('hasty-server');\nconst  server = new  Hasty();\n\nserver.get('/', (req, res) =\u003e {\n    res.send('Hello World');\n});\n\nserver.listen(8080, () =\u003e {\n    console.log('Server is running on port 8080');\n});\n```\n    \n**ES6**\n\n```Javascript\nimport Hasty from 'hasty-server';\nconst  server = new  Hasty();\n\nserver.get('/', (req, res) =\u003e {\n    res.send('Hello World');\n});\n\nserver.listen(8080, () =\u003e {\n    console.log('Server is running on port 8080');\n});\n```\n\n**TypeScript**\n\n```typescript\nimport Hasty, { Request, Response } from 'hasty-server';\n\nconst server = new Hasty();\n\nserver.get('/', (req: Request, res: Response) =\u003e {\n    res.json({ message: 'Hello from TypeScript!' });\n});\n\nserver.post('/api/users', (req: Request, res: Response) =\u003e {\n    const userData = req.body;\n    res.status(201).json({ id: 1, ...userData });\n});\n\nserver.listen(8080, () =\u003e {\n    console.log('TypeScript server running on port 8080');\n});\n```\n\n### Request Object\n\nSome of the features in  `response object` are:\n\n- `send` : Send a response to the client.\n    - Usage: `res.send('Hello World')`\n\n- `json` : Send a JSON response to the client.\n    - Usage: `res.json({message: 'Hello World'})`\n\n- `status` : Set the status code of the response.\n    - Usage: `res.status(200)`\n    - Default status code is 200.\n    \n### Contributing\n\nIf you would like to contribute to Hasty Server, you're welcome to:\n\n - Fork the repository.\n - Create a branch for your feature or bugfix.\n - Submit a pull request.\n - Please make sure to read the [contribution guidelines](CONTRIBUTING.md) for more details.\n\nNote: Do not use third-party code or dependencies. You can take help from language models, but avoid directly copying any of their code.\n\n### CHANGELOG\n -  v0.9.6 \n    - Added comprehensive module support (CommonJS, ESM, TypeScript)\n    - Added dual package support with automatic module detection\n\n\nFor more information, see .\n[CHANGELOG](CHANGELOG.md)\n\n### LICENSE\n\nThis project is licensed under LGPL-2.1 - see the [LICENSE](LICENSE.md) file for details.\n\nAll rights reserved to the author.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegeralex%2Fhasty-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintegeralex%2Fhasty-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegeralex%2Fhasty-server/lists"}