This example project builds on the previous Express Starter Project by adding a database. A database is a powerful way to store and retrieve the data used by our web application.
To accomplish this, we’ll learn about different libraries that interface between our application and a database. Once we’ve installed a library, we’ll discover how to use that library to create database tables, add initial data to those tables, and then easily access them within our application.
Project Deliverables
At the end of this example, we will have a project with the following features:
- An SQLite database
- The Sequelize ORM tool
- The Umzug migration tool
- A simple migration to create tables for Users and Roles
- Seed data for those tables
- Automated processes to migrate and seed the data on application startup
- A simple route to query user information
Prior Work
This project picks up right where the last one left off, so if you haven’t completed that one yet, go back and do that before starting this one.
Let’s get started!