Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



29 Commits

Repository files navigation


Are you a book lover? Is your To-Read pile unweildy? BookWorm is here to help! This app allows you to search books via (support your local bookstore!) and then add them to your "To Read" list so you can get organized and get reading. Once you've read a book, just click "I Read It!", and it will move to your "Done" list where you can watch your finished books pile up! It doesn't end there-- If you loved the book you can always click "Read Again" to move it back to your To-Read Pile; if you hated it, click "Delete" as your first step to forgetting it forever!


No Finished Books With Finished Books

Try it Out!

Click here to try the demo!

Installation Your Own Instance



Run the following commands in your preferred CLI to install the Node package and all dependencies:

git clone
cd bookworm
npm i

Create a new file called .env that will store your MySQL server information:

touch .env

Format the contents of .env as follows, substituting your MySQL server information where applicable:


Import the database schema and optional demo data:

#login to mysql
mysql -u username -p

#import the required schema
source db/schema.sql

#import the optional demo data
source db/seeds.sql

Start the application by using the following command:

npm start

Open the application in your preferred web browser by visiting http://localhost:3000. Enjoy!

Technical Information

Code Snippets

The following code snippet shows the custom Object Relational Mapper (ORM) built for BookWorm:

const db = require('./connection.js');

module.exports = {
    selectAll: (tableName,callback) => {
        db.query("SELECT * FROM ??",[tableName],(err, res) => {
            if (err) throw err;
    insertOne: (tableName,newData,callback) => {
        db.query("INSERT INTO ?? SET ?",[tableName,newData], (err, res) => {
            if (err) throw err;
    updateOne: (tableName,newData,condition,callback) => {
        db.query("UPDATE ?? SET ? WHERE ?",[tableName,newData,condition], function(err,res) {
            if (err) throw err;
    deleteOne: (tableName,condition,callback) => {
        db.query("DELETE FROM ?? WHERE ?",[tableName,condition],(err,res) => {
            if (err) throw err;

And the Book model built using the custom ORM:

const orm = require('../config/orm.js');

module.exports = {
    all: cb => orm.selectAll("books",res => cb(res)),
    create: (data, cb) => orm.insertOne("books",data,res => cb(res)),
    update: (data,condition,cb) => orm.updateOne("books",data,condition,res => cb(res)),
    delete: (condition, cb) => orm.deleteOne("books",condition,res => cb(res))

Learning Points:

  • The practice of creating my own ORM helped me understand how ORM packages work in their simplest form, as well as helped me learn best practices for implementing them.
  • Great practice working with a Model-View-Controller design pattern and architecting my application with those principles in mind.
  • Learned how to scrape data from sites and use Cheerio to run jQuery commands to manipulate DOM elements in Node

Built With


Amanda Atkins


This project is licensed under the ISC License.