ICP 7 - puji1826/Web GitHub Wiki

Name : Pujitha Talluri

Group Number :11

Email:[email protected]


Introduction Instructions to execute Source Code: LibraryManagementSystem Step 1: Start the Mongo Server(Refer Installation PPT) Step 2: Install node modules (command: 'npm install') Step 3: Start node server (command: 'npm run start') Step 4: Navigate to localhost (http://localhost:3000/) to display and interact with the application

In the above use case, implement update and delete functionality (user should able to update the book details and delete the book from the database) Note: Change the UI if you are going to use the given code


Database The database i used was local instance of the MongoDB the connection string for the database was stored in a Config.js and was used by the web server. The web server used the Mongoose library to interface with the database. The first step of working with the database was to establish a connection with local file


Step 1:Next step is to create a schema module to interact with the database

Code of the Book Model.

Step 2: API calls to update and delete books.so i can retrieve, add, edit and delete books from the database

** The database with 2 entries:**

Edit Book

Here in Edit Book page consists of a form with data entered into the fields from the database allows the user to change the fields and submit the changes. and then there is a button allowing the user to return to the Book List page.

The typescript configure the form applies the form validation then sets each value from the data for the book from the database. It also contains a method to allow the submission of the edited data.

HTTP call logs

Output:

List of Books

Adding a new Book

Book details page

Edit page to edit the book details (to chandana)

Book details after updating the book Author name.

List of books page after deleting the book