This project utilizes the inspirational-quotes library to develop an API service between server and client.
You can add your own quotes here
Clone the repo and install npm library inspirational-quotes
- VS Code
- A good understanding of API and Html, Css, and Javascript.
For this particular project, there are no specific installation requirements.
This project is hosted on Github.
- Yiting Liu -- ITP 2021-- NYU ITP
Attribution 4.0 International (CC BY 4.0)
#Updates 03/08/2020 I used NedB and created a databse for this inspirational quotes. The process is quite simple for me.
I ran into problems with it first since the json file I worked with has two elements in one object. But then I tried to use the console.log to trouble shoot and it worked great.
One thing it didn't work was due to me not installing the nedb.
I used several methods from db to find, update, and remove specific items.
I tried to find "Chinese Proverb" in the from variable in the database and succeeded.
I also deleted my test quotes by deleting the _id.
I wanted to create a website where users can contribute to the existing database. I chose inspirational-quotes since it is well documented. I followed the examples in the files when I installed the library.
Although it took me quite a while to understand the code, I am glad I figured most of the things out and I did the coding project by myself and with the help of Google.
I followed the tutorials of the Back-end-foundation-workbook since I couldn't really follow in class. The extra time spent on doing the exercises is worth it. But this week, I spent an extreme amount in learning the back end. It is quite harder than the front end that I am more familiar with.
I ran into several bugs during this project:
-
Due to the wrong src for client.js, the console keeps telling me the window is undefined.
-
I used Postman to figure out what I should do to send an object of quote and author. But it really took me a long time to figure it out.
- At first, when I try to POST anything, it only shows null or undefined.
- In my console, it prints out the whole object without parsing out the text and from.
- I couldn't add my textInput to the existing array upon mouse click.
- When I wanted to console.log the array content, it shows me the position of the element instead.
I am still confused about using the function from another js file. In the example I saw, they used "module.exports".