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

Project-express-api #530

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# Project Express API

Replace this readme with your own information about your project.

Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
We had to create or own API using Epress.js, we were given a boilerplate to start with, the goal was to creat a RESTful API that provides data from a JSON file. I used a dataset of books to create endpoints that return all books, a sigle book by ID, and allow filtering and pagination

## The problem

Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
I did first my own data (sleep_health...) just to try, but I decided to go for books.json in case something went wrong I had time to fix it.

We had to use Express.js to build backend server and define routers, CORS to allow cross-origin request, Nodemon for easy development by auto-reloading the server and Express list endpoints to list all available routs for API documentation

also, during development, I encountered the error:
csharp that appeared on the terminal in a red text: [nodemon] app crashed - waiting for file changes before starting...
I asked chatgpt for help and I learned that this happened due to syntax errors, missing dependencies, or referencing undefined variables.

I had to check the server logs for specific error, installed any missing packages and used npx babel-node server.js to debug issues direclty, I restarted the server after fixes using npm run dev,

If i had more time Add more I would add ore of the stretch goals such as filtering options. Build a React frontend to consume the API. and Use a database like MongoDB for persistent data storage.


## View it live

Expand Down
Loading