Skip to content

[FORK] ๐Ÿ’Š Minimal Express RESTful API boilerplate. Spin it up with single command. TypeScript, TypeORM, MariaDB with focus on best practices and painless developer experience.

License

Notifications You must be signed in to change notification settings

selhuberb/typeorm-express-typescript-mariadb

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TypeORM with MariaDB / Express / TypeScript RESTful API boilerplate

CI TypeScript prettier Heisenberg

This is a fork of mkosirยดs boilerplate. It has been adapted to my needs with:

  • Change of Postgres to MariaDB
  • TypeORM v0.2 upgrade to v0.3
  • Remove of Docker

Boilerplate with focus on best practices and painless developer experience:

  • Minimal setup that can be extended ๐Ÿ”ง
  • Spin it up with single command ๐ŸŒ€
  • TypeScript first
  • RESTful APIs
  • JWT authentication with role based authorization

Requirements

Running

Easily set up a local development environment with single command!

  • clone the repo
  • npm run dev ๐Ÿš€

Visit localhost:4000 or if using Postman grab config.

_Overview__ ๐Ÿ’ฅ

  • Node (v16 ) with running boilerplate RESTful API service
  • MariaDB database can be seeded with ๐Ÿ’Š Breaking Bad characters in Users table (set your credentials in .env file)

Features

  • Express framework
  • TypeScript v4 codebase
  • TypeORM using Data Mapper pattern
  • Contract first REST API design:
    • never break API again with HTTP responses and requests payloads using type definitions
    • Consistent schema error response. Your frontend will always know how to handle errors thrown in try...catch statements ๐Ÿ’ช
  • JWT authentication and role based authorization using custom middleware
  • Set local, stage or production environmental variables with type definitions
  • Logging with morgan
  • Unit and integration tests with Mocha and Chai
  • Linting with ESLint
  • Prettier code formatter
  • Git hooks with Husky and lint-staged
  • Automated npm dependency updates with Renovate (set to patch version only)
  • Commit messages must meet conventional commits format.
    After staging changes just run npm run commit and get instant feedback on your commit message formatting and be prompted for required fields by Commitizen

Other awesome boilerplates

Each boilerplate comes with it's own flavor of libraries and setup, check out others:

Contributing

All contributions are welcome!

Hint for git ignored files

Config files have been ignored from git index to not track any further changes

git update-index --assume-unchanged .env
git update-index --assume-unchanged config/

To revert simply use

git update-index --no-assume-unchanged .env
git update-index --no-assume-unchanged config/

About

[FORK] ๐Ÿ’Š Minimal Express RESTful API boilerplate. Spin it up with single command. TypeScript, TypeORM, MariaDB with focus on best practices and painless developer experience.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.9%
  • JavaScript 2.8%
  • Shell 2.3%