DEV Community

Building a Production - Ready Node.js App with TypeScript and Docker

GaneshMani on September 28, 2019

In this article, we will see how to build a Node.js, TypeScript Application and deploy it to server with Docker. Building a Production - Ready Node...
Collapse
 
chaluvadis profile image
Curious to learn new things

Good article.

One small typo.

Running tsc init on empty directory will throw error TS6053: File 'init.ts' not found.

update the command to tsc --init

Check out the following stackover flow link.

stackoverflow.com/questions/384330...

Collapse
 
ganeshmani profile image
GaneshMani

Thank you. i missed it...

Collapse
 
obsessiveprogrammer profile image
Tom Bonanno

Not sure I would run it in production with ts-node. Might add unnecessary overhead and impact performance. IMO, ts-node should be a devDependency.

Collapse
 
ganeshmani profile image
GaneshMani

ts-node is for development. we need to take a build using tsc -p . and deploy it to production.

Collapse
 
obsessiveprogrammer profile image
Tom Bonanno

Ah yes. Just noticed you are running with pm2 in your Dockerfile.

Collapse
 
heymarkkop profile image
Mark Kop

Great article, I was looking for some TypeScript and Docker content and this is pretty helpful. :D

Collapse
 
ganeshmani profile image
GaneshMani

Thanks..Glad you like it