
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
sequelize-ts-boilerplate
Advanced tools
A REST API scaffolding tool designed to scale and easily generate CRUD endpoints based on database schema design
A REST API / Data-Access-Layer scaffolding tool designed to scale and easily generate CRUD endpoints based on database schema design.
npm install -g sequelize-ts-boilerplate
sequelize-ts-boilerplate your-config.json
JSON configuration file your-config.json
will default to config.json
if not present as arg.
npm install
tsc
npm run dev
If you are looking for an enterprise framework, nest is highly recommended. Angular and Java Spring developers will feel at home.
This tool is specifically designed to scaffold a routes -> controllers -> services -> daos
project architecture using Typescript and Sequelize-Typescript ORM and to maintain a Node.js feel.
config.json
file
{
"ENV": "dev", // make name of ENV a property in DATABASE_CONNECTION_SETTINGS
"DATABASE_CONNECTION_SETINGS": {
"dev": {
"host": "your-host-url",
"db": "your-db-name",
"username": "your-username",
"password": "your-password",
"dialect": "mysql | mssql",
"port": "3306"
}
},
"ORM_GENERATE": {
"caseSensitiveProps": [],
"skipTables": [],
"manyToManyIdentifiers": ["map"],
"lookup": { // creates transient properties for CONSTANT | ENUM style table
"tableName": "Lookup",
"identifier": "lkp",
"sliceOut": "Oid"
},
"pkIdentifier": "id",
"path": {
"ormWrapper": "optional/path/to/generated/orm/wrapper/file.ts",
"daos": "optional/path/to/generated/daos/folder",
"services": "optional/path/to/generated/services/folder",
"interface": "optional/path/to/generated/interface/file.ts"
}
},
"CRUD_GENERATE": {
"shouldGenerate": true,
"framework": "express",
"ignoreTables": []
}
}
Folders generated:
Files generated:
all Node framework plumbing
interfaces file containing all database entities (for use on front-end)
ORM wrapper (provides namespace, intellisense, etc for accessing DAOS)
Controller and Service files will not be overwritten on subsequent generations. DAOS will be regenerated every time.
A quick note: this was made quickly and without tests. I am happy to continue contributing and fixing issues, however, I enjoy doing things other than coding in my free time as well :)... I welcome contributions. Some potential features to add:
FAQs
A REST API scaffolding tool designed to scale and easily generate CRUD endpoints based on database schema design
The npm package sequelize-ts-boilerplate receives a total of 3 weekly downloads. As such, sequelize-ts-boilerplate popularity was classified as not popular.
We found that sequelize-ts-boilerplate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.