S
S
sneeeg2020-12-12 21:22:08
Node.js
sneeeg, 2020-12-12 21:22:08

How to compile all .ts files to .js when starting node express server?

There is a project structure

  • node_modules
  • static
  • index.html
  • package.json
  • server.js
  • tsconfig.json


There static/jsare .ts files in the folder, when you start the server you node server.jsneed to compile the .ts files into .js or into the same folder.
How to set up the server correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Lewandowski, 2020-12-12
@vovaspace

Run ts - ts-node right away .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question