garyx garyx - 1 year ago 76
Node.js Question

How to use typescript/flow in nodejs without compiling it

Can someone give me some advice or links for discussion on whether I should bundle JS for backend?

I tried to Google with this title (and similar words) and I can't get any useful links.

Just want to know, say I am using latest Node.JS (es6-ready), should I bundle/compile the JS? If not, how am I suppose to use typescript/flow?

Thank you.

Answer Source

In this context, "compile" means to make one .js file from several .ts files, right?

I think just running

$ tsc

at the project root generates .js files without bundling/compiling.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download