In-Memory Todo CRUD API with Node.js and Express#275
Open
beabcanoy wants to merge 3 commits intoZeff01:mainfrom
Open
In-Memory Todo CRUD API with Node.js and Express#275beabcanoy wants to merge 3 commits intoZeff01:mainfrom
beabcanoy wants to merge 3 commits intoZeff01:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a simple in-memory Todo REST API to the backend Express app, exposing CRUD endpoints under /api and using a shared array as the data store.
Changes:
- Switch backend runtime to ES modules and mount
/apitodo routes. - Add todo routes + controller implementing create/read/update/delete for in-memory todos.
- Add an in-memory
todosdata module and adevscript for local development.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| backend/index.js | Converts server entrypoint to ESM, enables JSON parsing, mounts /api routes |
| backend/package.json | Declares ESM mode and adds dev script + new dependency entry |
| backend/routes/todo.routes.js | Defines REST routes for todo CRUD endpoints |
| backend/controllers/todo.controller.js | Implements CRUD handlers and ID generation |
| backend/data/todos.js | Adds shared in-memory todos array |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A simple RESTful API using Node.js and Express that manages todos in memory. Supports creating, updating (including toggling completed), and deleting todos with validation and clear messages. All data is stored in a shared array that resets when the server stops or there are changes in code, ideal for learning backend development, testing endpoints, and learning without a database.