Closed CYCBrian closed 10 months ago
move apir and html codes to their respective folder.
solved issue of webapp not automatically retrieving data from db.json and displaying it. turned out the it's a problem with the *html route interacting with the order in which the app use code was place. now /api for api routes goes first, then / for html routes.
solved issue where delete function did not work in the web app. I used uuid because it's just what the package is called, but index.js specifically looks for id instead. changed the const uuid to id in the post request in api routes so now it works.
DONE!
forgot to mentions i've also deleted the code i made in server.js because i've moved them to their respective route files. and I've added the paths and what not and exports and requires and WHATEVER I CAN'T BELIEVE I HAVE TO KEEP USING EXPRESS I HATE IT
modularize all the code i made into two separate folder in the routes folder then link those files to the main server.js file