Web_ICP7 - Ggr9d/Web-and-Mobile-Programming GitHub Wiki

As part of this ICP task we have learned the CRUD(Create, Read, Update and Delete) Operations and the basics of node.js, Express, Mongodb. Established the connection so that front-end and back-end can communicate with each other. Initial requirements for this ICP task is to install mongodb and we have used the documentation provided in lesson plan as reference for installation.

For this ICP we have used local connection instead of using with cloud and have started and connected to the mongodb using below commands:

"C:\Program Files\MongoDB\Server\3.2\bin\mongod.exe": command to start mongodb "C:\Program Files\MongoDB\Server\3.2\bin\mongo.exe: command to connect to mongodb

With book.js containing the code to save, get, update and delete book the routes for the application are done.

Below is the code for app.js using which we can check the MongoDB Connection and ensure that the database is connected with our application.

Below is the HTML code for initial book table

Below is the HTML code for book creation

Below is the code for typescript file for book create

Below is the html code for book details and deletion of book

Typescript code for book details and deletion of book

Below is the css code for adding the background image.

OUTPUT:

By executing the command "npm run start" we have established connection and after the execution displays "Connection successful".

Below is the initial screen displayed when the application is executed.

After adding the books

Below displays the books information.

Below displays the update function of the application. Here, we have updated the publisher for Chroniclebooks.

Deleted the book Chroniclebooks