Built an wtodo from scratch for Homework#872
Open
wahidahsharifi wants to merge 9 commits into
Open
Conversation
The v1 version of app is built
Moved todo-related logic from index routes to a dedicated controller and route file. Removed patchSendFileRoot in favor of a view helper for serving views. Updated static file serving and adjusted frontend API endpoints to match new routes.
Moved morgan logging middleware to run before body parsing and static serving, and added route skipping for assets in development mode. Removed unnecessary console.log statements from todo controller. Updated project name and description in package.json, and moved @types/morgan from dependencies to devDependencies.
Updated the sendAllTodos controller method to fetch todos without using .lean(), returning Mongoose documents instead of plain JavaScript objects.
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.
🧰 What's Changed:
README.mdwith setup instructions, features, tech stack, and a roadmap📝 Why I Built It:
This was created as my homework assignment for the class. It demonstrates full-stack fundamentals (routing, server-side rendering, CRUD operations) and sets a strong base for the upcoming React refactor.
⚙️ Setup & Testing Notes:
bun installconfig/config.envfile with your own DB credentialsbun starthttp://localhost:5000/and test: adding, checking/unchecking, and deleting todos