{"id":20536011,"url":"https://github.com/richardnguyen99/express-js-sqlite3-template","last_synced_at":"2026-04-28T23:39:48.682Z","repository":{"id":246099723,"uuid":"818766952","full_name":"richardnguyen99/express-js-sqlite3-template","owner":"richardnguyen99","description":"Boilerplate for a Todo API service using Express, JavaScript and SQLite3 ","archived":false,"fork":false,"pushed_at":"2024-08-01T19:27:20.000Z","size":495,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T09:41:39.859Z","etag":null,"topics":["api","express","expressjs","javascript","jest","json","sqlite3","supertest","testing","todo","todoapp","todolist"],"latest_commit_sha":null,"homepage":"","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/richardnguyen99.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-22T20:00:22.000Z","updated_at":"2024-08-01T19:27:24.000Z","dependencies_parsed_at":"2024-06-25T21:31:30.766Z","dependency_job_id":"03445f80-7884-45b6-abea-b6974a7f3c47","html_url":"https://github.com/richardnguyen99/express-js-sqlite3-template","commit_stats":null,"previous_names":["richardnguyen99/express-js-sqlite3-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/richardnguyen99/express-js-sqlite3-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardnguyen99%2Fexpress-js-sqlite3-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardnguyen99%2Fexpress-js-sqlite3-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardnguyen99%2Fexpress-js-sqlite3-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardnguyen99%2Fexpress-js-sqlite3-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardnguyen99","download_url":"https://codeload.github.com/richardnguyen99/express-js-sqlite3-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardnguyen99%2Fexpress-js-sqlite3-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32404340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"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":["api","express","expressjs","javascript","jest","json","sqlite3","supertest","testing","todo","todoapp","todolist"],"created_at":"2024-11-16T00:35:04.256Z","updated_at":"2026-04-28T23:39:48.665Z","avatar_url":"https://github.com/richardnguyen99.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# express-js-sqlite3-template\n\nBoilerplate for a Todo API service using Express, JavaScript and SQLite3\n\n## Getting started\n\n1. Clone the repository\n2. Run `npm install`\n3. Run `npm run dev` to spin the development server\n\n## API Endpoints\n\n### `GET /todos`\n\nFetch all the todo items from the database.\n\n```bash\ncurl http://localhost:3000/todos\n```\n\n- On success, it returns a list of todo items.\n\n  - Example response:\n\n    ```json\n    {\n    \"todos\": [\n        {\n        \"id\": 1,\n        \"title\": \"Buy groceries\",\n        \"completed\": 0,\n        \"userId\": 1,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n        },\n        {\n        \"id\": 2,\n        \"title\": \"Walk the dog\",\n        \"completed\": 0,\n        \"userId\": 1,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n        },\n        {\n        \"id\": 3,\n        \"title\": \"Do laundry\",\n        \"completed\": 0,\n        \"userId\": 2,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n        },\n        {\n        \"id\": 4,\n        \"title\": \"Wash the car\",\n        \"completed\": 0,\n        \"userId\": 2,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n        },\n        {\n        \"id\": 5,\n        \"title\": \"Water the plants\",\n        \"completed\": 0,\n        \"userId\": 3,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n        },\n        {\n        \"id\": 6,\n        \"title\": \"Mow the lawn\",\n        \"completed\": 0,\n        \"userId\": 3,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n        },\n        {\n        \"id\": 7,\n        \"title\": \"Take out the trash\",\n        \"completed\": 0,\n        \"userId\": 4,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n        },\n        {\n        \"id\": 8,\n        \"title\": \"Vacuum the house\",\n        \"completed\": 0,\n        \"userId\": 4,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n        },\n        {\n        \"id\": 9,\n        \"title\": \"Pick up Johnny from school\",\n        \"completed\": 0,\n        \"userId\": 5,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n        },\n        {\n        \"id\": 10,\n        \"title\": \"Drop off dry cleaning\",\n        \"completed\": 0,\n        \"userId\": 5,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n        }\n    ]\n    }\n    ```\n\n  - Status code: `200`\n  \n### `GET /todos/:id`\n\nFetch a single todo item by its ID.\n\n```bash\ncurl http://localhost:3000/todos/7\n```\n\n- On success, it returns a single todo item.\n\n  - Example response:\n\n    ```json\n    {\n      \"todo\": {\n        \"id\": 7,\n        \"title\": \"Take out the trash\",\n        \"completed\": 0,\n        \"userId\": 4,\n        \"createdAt\": \"2024-07-31 17:19:05\",\n        \"updatedAt\": \"2024-07-31 17:19:05\"\n      }\n    }\n    ```\n\n  - Status code: `200`\n\n- On failture, it returns an error message.\n\n  - Example response:\n\n    ```json\n    {\n      \"message\": \"Todo item not found\"\n    }\n\n    ```\n\n  - Status code: `404`\n\n### `POST /todos`\n\nCreate a new todo item.\n\n```bash\ncurl -X POST http://localhost:3000/todos                                      \\\n      -H 'Content-Type: application/json'                                     \\\n      -d '{\"title\": \"finish unittesting 1\", \"userId\": 11, \"completed\": false}'\n```\n\n- On success, it returns the newly created todo item.\n\n  - Example response:\n\n    ```json\n    {\n      \"todo\": {\n        \"id\": 11,\n        \"title\": \"finish unittesting 1\",\n        \"completed\": false,\n        \"userId\": 10\n      }\n    }\n    ```\n\n  - Status code: `201`\n\n- On failture, it returns an error message.\n\n  - Example response:\n\n    ```json\n    {\n      \"message\": \"Todo item already exists\"\n    }\n    ```\n\n  - Status code: `400`\n\n### `PUT /todos/:id`\n\nUpdate a todo item by its ID.\n\n```bash\ncurl -X PUT http://localhost:3000/todos/9                                      \\\n      -H 'Content-Type: application/json'                                     \\\n      -d '{\"title\": \"finish unittesting 2\", \"userId\": 10, \"completed\": true}'\n```\n\n- On success, it returns the updated todo item.\n\n  - Example response:\n\n    ```json\n    {\n      \"todo\": {\n        \"id\": \"9\",\n        \"title\": \"finish unittesting 2\",\n        \"completed\": true,\n        \"userId\": 10\n      }\n    }\n    ```\n\n  - Status code: `200`\n\n- On failture, it returns an error message.\n  \n  - Example response:\n  \n      ```json\n      {\n        \"message\": \"Todo item not found\"\n      }\n      ```\n  \n  - Status code: `404`  \n\n### DELETE /todos/:id\n\nDelete a todo item by its ID.\n\n```bash\ncurl -X DELETE http://localhost:3000/todos/9\n```\n\n- On success, it returns a success message.\n\n  - Example response:\n\n    ```json\n    {\n      \"message\": \"Todo item deleted successfully\"\n    }\n    ```\n\n  - Status code: `200`\n  \n- On failture, it returns an error message.\n\n  - Example response:\n\n    ```json\n    {\n      \"message\": \"Todo item not found\"\n    }\n\n    ```\n\n  - Status code: `404`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardnguyen99%2Fexpress-js-sqlite3-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardnguyen99%2Fexpress-js-sqlite3-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardnguyen99%2Fexpress-js-sqlite3-template/lists"}