Express typescript starter template for taking your project to the high road as quickly as possible.

Benjamin Chibuzor-Orie
2 min readSep 1, 2020

Hello there! You’ve come to the right place if you’re looking for an express typescript template for your new project. The pain of having to start from scratch is excruciating and I think this will help ease that up a whole lot.

TL; DR

Template source code.

The template repo can be found here: https://github.com/iambenkay/express-ts-starter and you can use it to start your own projects directly from there.

So, a quick rundown of what each portion of this template offers:

  • An ideal typescript configuration (tsconfig.json and tslint.json)
  • A nodemon configuration for hot reload during development
  • A database service that works with MongoDB out of the box
  • A mailing service
  • A hashing service for sensitive data like passwords
  • A token service for creating JWT tokens (in case you do need it)
  • A mail templating service using MJML

As soon as you initialize your project the first things to do is to change .env.example to .env and set the necessary environment configurations.

MONGO_URI, PORT, EMAIL_HOST, EMAIL_PORT, EMAIL_USER, EMAIL_PASS, EMAIL_USE_TLS, JWT_SECRET.

once you set these configuration parameters you are good to go.

src/@types is meant to hold your custom TS declarations. TSConfig will pick them up during compilation.

You can define your routers in src/interfaces/rest for a Rest API or src/interfaces/web for MVC based applications.

Good luck on your journey to completing that great app! Cheers!! 🥳🥳

--

--

I write about computers, servers, backend frameworks and programming languages