While building the business logic for Tendies Switch, I created a TypeScript based stack for testing & production with the following features:
- Deploy to Docker
- Instant reload in debug mode
- ESLint & Prettier support for Visual Studio Code out of the box
Since my open source MERN stack template received such positive feedback, I am obliged to continue in a similar spirit by sharing my Dockerized TypeScript template.
🎬 Getting Started
Source code is available here. Entry point for the app is src/app.ts.
Execute source code with nodemon for live reloading of code changes.
Run all *.test.ts files in test/ directory.
Export app to prod/app.ts after running tsc & rollup.
🍔 Tech Stack
🔨 Unit Testing
Mocha & Chai go together like peanut butter & jelly. The only serious competition for Mocha is Jest, and because we are not developing a React app, we do not need the snapshot feature to track UI changes during unit testing.
🔩 Code Quality
🛥️ External Ports
If you wanted to extend this template to create an API server, you would do so in your docker-compose file utilizing the output image from this template or when running from the command line like this:
docker run -p <public_port>:<private_port> -d <image>
Overall, I am glad to share this template to help anyone developing TypeScript applications save an afternoon of tedious configuration. I can't wait to see what the community builds.