{"id":32640862,"url":"https://github.com/jahidul2004/todo-server-raw-nodejs","last_synced_at":"2026-04-15T23:32:16.964Z","repository":{"id":313516555,"uuid":"1051702627","full_name":"jahidul2004/todo-server-raw-nodejs","owner":"jahidul2004","description":"A simple Node.js server for managing a todo list using the built-in http, fs, and path modules. This project demonstrates how to build a RESTful API without any external frameworks, storing data in a local JSON file.","archived":false,"fork":false,"pushed_at":"2025-09-06T14:52:23.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-31T02:55:00.038Z","etag":null,"topics":["filesystem","javascript","nodejs","server","todoapp"],"latest_commit_sha":null,"homepage":"","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/jahidul2004.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-06T14:47:46.000Z","updated_at":"2025-09-06T14:54:52.000Z","dependencies_parsed_at":"2025-09-06T16:29:05.404Z","dependency_job_id":"e9a562f0-293d-4e5d-a33a-6b4c19258ae3","html_url":"https://github.com/jahidul2004/todo-server-raw-nodejs","commit_stats":null,"previous_names":["jahidul2004/todo-server-raw-nodejs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jahidul2004/todo-server-raw-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahidul2004%2Ftodo-server-raw-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahidul2004%2Ftodo-server-raw-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahidul2004%2Ftodo-server-raw-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahidul2004%2Ftodo-server-raw-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jahidul2004","download_url":"https://codeload.github.com/jahidul2004/todo-server-raw-nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahidul2004%2Ftodo-server-raw-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31865029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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":["filesystem","javascript","nodejs","server","todoapp"],"created_at":"2025-10-31T02:52:46.111Z","updated_at":"2026-04-15T23:32:16.958Z","avatar_url":"https://github.com/jahidul2004.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Todo App Server\n\nA simple Node.js server for managing a todo list using the built-in `http`, `fs`, and `path` modules. This project demonstrates how to build a RESTful API without any external frameworks, storing data in a local JSON file.\n\n## Features\n\n-   View all todos\n-   Add a new todo\n-   Get a todo by ID\n-   Update a todo by ID\n-   Delete a todo by ID\n\n## Project Structure\n\n```\ntodoAppServer/\n├── app.js           # Main server file\n├── db/\n│   └── todo.json    # Local JSON database for todos\n├── readme.md        # Project documentation\n```\n\n## Getting Started\n\n### Prerequisites\n\n-   Node.js installed on your system\n\n### Running the Server\n\n1. Open a terminal and navigate to the `todoAppServer` directory.\n2. Run the following command:\n\n    ```sh\n    node app.js\n    ```\n\n3. The server will start on [http://localhost:3000](http://localhost:3000)\n\n## API Endpoints\n\n### 1. Root\n\n-   **GET /**\n-   **Description:** Check if the server is running.\n-   **Response:** `{ \"message\": \"Server is up and running\" }`\n\n### 2. Get All Todos\n\n-   **GET /todos**\n-   **Description:** Retrieve all todo items.\n-   **Response:** Array of todo objects\n\n### 3. Get Todo by ID\n\n-   **GET /todo?id=ID**\n-   **Description:** Retrieve a single todo by its ID.\n-   **Response:** Todo object or 404 if not found\n\n### 4. Create a New Todo\n\n-   **POST /todos/create-todo**\n-   **Description:** Add a new todo item.\n-   **Request Body:** JSON object (e.g., `{ \"id\": 11, \"task\": \"New Task\", \"completed\": false }`)\n-   **Response:** Success message\n\n### 5. Update a Todo\n\n-   **PATCH /todos/update-todo?id=ID**\n-   **Description:** Update an existing todo by ID.\n-   **Request Body:** JSON object with updated fields\n-   **Response:** Success message or 404 if not found\n\n### 6. Delete a Todo\n\n-   **DELETE /todos/delete-todo?id=ID**\n-   **Description:** Delete a todo by ID.\n-   **Response:** Success message or 404 if not found\n\n### 7. Not Found (Fallback)\n\n-   **Any undefined route**\n-   **Description:** If a request is made to an undefined route, the server responds with a 404 status and a message.\n-   **Response:** `{ \"message\": \"Route not found\" }`\n\n## Data Format\n\nEach todo item in `db/todo.json` has the following structure:\n\n```json\n{\n    \"id\": 1,\n    \"task\": \"Buy groceries\",\n    \"completed\": false\n}\n```\n\n## Notes\n\n-   All data is stored locally in `db/todo.json`.\n-   This server is for learning/demo purposes and does not implement authentication or advanced error handling.\n\n## Author\n\n-   Written by Jahidul Islam Jihad\n\n---\n\nFeel free to modify and extend this project for your own needs!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjahidul2004%2Ftodo-server-raw-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjahidul2004%2Ftodo-server-raw-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjahidul2004%2Ftodo-server-raw-nodejs/lists"}