{"id":25924938,"url":"https://github.com/criszst/myexpress","last_synced_at":"2025-03-03T18:33:19.674Z","repository":{"id":274568874,"uuid":"923330693","full_name":"criszst/MyExpress","owner":"criszst","description":"🚀 | Minimal Express built with TypeScript","archived":false,"fork":false,"pushed_at":"2025-03-01T23:21:55.000Z","size":4782,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T00:23:27.437Z","etag":null,"topics":["express","express-ts","express-typescript","jest","jest-tests","ts","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/criszst.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":"2025-01-28T03:19:45.000Z","updated_at":"2025-03-01T23:21:59.000Z","dependencies_parsed_at":"2025-03-02T00:20:37.792Z","dependency_job_id":"c46d4942-88cd-4cb2-846b-c39568a08544","html_url":"https://github.com/criszst/MyExpress","commit_stats":null,"previous_names":["criszst/myexpress"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criszst%2FMyExpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criszst%2FMyExpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criszst%2FMyExpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criszst%2FMyExpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/criszst","download_url":"https://codeload.github.com/criszst/MyExpress/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241718392,"owners_count":20008563,"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":["express","express-ts","express-typescript","jest","jest-tests","ts","typescript"],"created_at":"2025-03-03T18:33:19.065Z","updated_at":"2025-03-03T18:33:19.653Z","avatar_url":"https://github.com/criszst.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 MyExpress  \n\nA lightweight Express-like framework that I built for fun. While I won’t be implementing all the features of Express, I’ll be adding the essential ones to keep the project clean and functional.  \n\u003cbr/\u003e\n\n## Checklist  \n\n- [x] Basic app with `send`, `post`, `res`, `req`, and `next` methods.  \n- [x] Recreated some libraries to reduce dependencies (better for security).  \n- [x] Interfaces to keep the code clean and maintainable.  \n- [ ] Function to send an HTML file to the client.  \n- [ ] More built-in middlewares.  \n- [ ] Additional tests.  \n\n\u003cbr/\u003e\n\n## Features  \n\n- **`send(data)`** → Sends an object or text directly to the client.  \n- **`json(data)`** → Returns a JSON response.  \n- **`download(filePath)`** → Sends a file to be downloaded by the client.  \n- **`redirect(url)`** → Redirects the client to a specific URL (public domain or local project file).  \n- **`sendFile(filePath)`** *(in development...)* → Sends the content of a file to the client (currently supports only `.txt` files).  \n\n## Usage  \n\nSome quick examples of how to use it:  \n\n```ts\nresponse.send(\"Hello, client!\"); // Sends a text response  \nresponse.json({ hello: \"world\" }); // Sends a JSON response  \nresponse.download(\"./download.test.txt\"); // Forces a file download  \nresponse.redirect(\"https://example.com\"); // Redirects the user  \nresponse.sendFile(\"./index.html\"); // Sends the content of a file  \n```\n\n**Note:** The `sendFile` method is still under development and currently only supports `.txt` files\n\n\u003cbr/\u003e\n\n## Installation  \n\nFirst, clone the repository:  \n\n```sh\ngit clone https://github.com/criszst/MyExpress.git\n```\n\nNavigate into the project directory:  \n\n```sh\ncd MyExpress\n```\n\nThen, install dependencies:  \n\n```sh\nnpm install\n```\n\nIf you want to run tests (optional but recommended):  \n\n```sh\nnpm run test\n```\n\nSince Node.js can't run TypeScript files directly, compile the project:  \n\n```sh\nnpm run build\n```\n\nFinally, start the server:  \n\n```sh\nnpm run start\n```\n\n\u003cbr/\u003e\n\n## Running the Server  \n\nThe server runs on port `3000`. Once it's up, visit:  \n\n[http://localhost:3000](http://localhost:3000)  \n\nYou should see the message:  \n`Hello, world!`  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcriszst%2Fmyexpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcriszst%2Fmyexpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcriszst%2Fmyexpress/lists"}