Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor #1

Open
wants to merge 73 commits into
base: main
Choose a base branch
from
Open

Refactor #1

wants to merge 73 commits into from

Conversation

JoseAlbDR
Copy link

Code refactor into diferent folders for better scalability and clean code:
Refactor all config variables from index.js to config folder.
Refactor all controllers logic from index.js to controllers folder.
Refactor all database logic from index.js to database folder.
Refactor all middlewares from index.js to middlewares folder.
Refactor all routes logic from index.js to routes folder
Refactor al utils from index.js to utils folder.

New features/improvements:
Create new folder structure for file uploads now is public/uploads/{username}/{filename}
Create new endpoint /users/me that returns user related data (id, username)
Create new notFoundMiddleware that returns an error message if the request route does not exist
Update logs with succesfully DB and server connection messages
Update Readme file
Upate al dependencies and devDependencies to latest versions
Add swagger documentation
Add postman collection file

Fixes:
Fix nodemon infinite loop while running dev script (npm run dev)

JoseAlbDR and others added 30 commits October 23, 2023 16:26
Fix message for console.log (server running url)
…loop ignoring json files with nodemon.json config file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants