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

Teste de Lucas Barboza #10

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

Conversation

LucasBarboza-maker
Copy link

Olá, aqui segue meu pull request, fiz a aplicação tanto front quanto back, usei um server mongo em cloud, gostei bastante deste teste, muito obrigado pela oportunidade!!

Abraços Lucas

This is the first commit of the project, that is a Recreation of a International Beer Company System.
Adding Express to build and configure backend
Adding mongodb module to connect backend with mongo
Adding files and folders that gonna be ignored by git
Adding mongoose package to use in the configuration and connection of
Adding dot env module to get info from .env file
This initialization is just to set the beggining of the architecture
This model will help to make migrations and add also add middleware to a mongo requisition
Moving db json file to the migrations folder to facilitate and organize migrations
Adding migrations commands to the package.json and creating the functions to be executed in case of migrating or cleaning database
Starting server to listen to requisitions
this is the basic get all route, this route is going to be modified after making the error handler and the filter
doing get by id using the handlerFactory
Finishing update route, using handlerFactory
Finishing create route using handlerFactory
Route for delete one beer of the database
Filter by any field that could be found in Beer model
sort function added to apiFeatures, can be sorted by any fields and more than one fields
Limiting filters that you send by parameters and select which you want
Adding pagination to my api that can be used by parameters
This catch async is used to prevent infinite loop and also thorws errors back to the user
Adding a prod script to the package.json to distinguish from a dev executation or a prod executation
This handler is used both in development or production, it can distinguish which kind of error message you should recieve
Using regex to find names like in mongodb
Using pm2 package to up the application in my server and make it work
Adding cors to enable comunication with the server
Setting cors to public meanwhile this application stay up
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.

1 participant