The goal of this project was to create an application for a fictional local library to help them manage their collection of books. The librarian has been using a simple SQLite database and has been entering data in manually. The librarian wants a more intuitive way to manage the library's collection of books.
In this project, I built a web application that includes pages to list, add, update, and delete books using JavaScript, Node.js, Express, Pug, and the SQL ORM Sequelize.
A live version of this project can be found here. Please note that the app is in hibernation mode and may take a couple of seconds to load.
- JavaScript
- Node.js
- Express
- Pug
- Sequelize ORM
- SQL
- Download or clone from Github
- Copy
library.db
from./production to ./development
since the development db is gitignored - run
npm install
- run
npm start
to start the server. The website can then be accessed locally by pointing the web browser tolocalhost:3000
- Added favicon handling via serve-favicon middleware
- Implemented pagination and search, search results are also paginated
- Added validation for Year: if year is filled, it must be numeric and between 1 and 4 digits
- The create/update book form will autofocus on the first input field and auto-select it when updating a book record
- Input fields will be selected when corresponding labels are clicked