Settting up a Sequelize, TypeScript, Node.js, Jest Project [Boilerplate with Repo] - Sequelize
I'm currently working on an open-source TypeScript/Node.js application called White Label where users can trade vinyl with each other. I'm building it for the purpose of teaching developers how to organize complex domain-logic using Domain-Driven Design.
In that project, I've gone the traditional route of using a relational database.
And my favourite ORM for interacting with relational databases is Sequelize.
In this quick article, I'll walk you though my project setup.
Want to just see the code? Check it out here, https://github.com/stemmlerjs/white-label.
The Sequelize ORM
Sequelize has been around for a while. When I first started building apps with Node.js in 2014, Sequelize was the most mature ORM around at the time.
There are some other awesome looking ORMs out there today, but because I've personally battle-tested Sequelize over time, it's normally been my first choice. They've even released official v5 TypeScript typings.
white-label └ bin └ www.ts # This is the startup script that boots the webserver └ dist # Builds go here └ scripts └ db └ create.js └ delete.js └ sequelize └ config └ migrations └ seeders runner.ts # .env .sequelizerc .jest.config.js
I hope this article was useful to you! Consider checking out my sponsors. I can continue to write quality articles for free because of them.
Thoughts? Share the article if you think it'll be useful to someone + join the discussion about this post on Twitter!
Stay in touch!
You may also enjoy...
A few more related articles
Learn how to use DDD and object-oriented programming concepts to model complex Node.js backends.
In software, change is inevitable. The more complex the software, the more it should be enabled to be changed. The SOLID principles are a set of principles all developers should know about in order to design robust, maintainable, and flexible software.
Want to be notified when new content comes out?
Join 2000+ other developers learning about Domain-Driven Design and Enterprise Node.js.
I won't spam ya. 🖖 Unsubscribe anytime.