#How to use Typescript with Apache Webserver

6 messages · Page 1 of 1 (latest)

worthy talon
#

Hello,
i haven't got a lot of experience with apache but we're using it on a small side project. I wanted to ask how I can integrate Typescript into that without needing to recompile every time.

warm thunder
#

the easiest way is by running tsc -w

#

this makes it so every time you save the file, it will auto-compile

cerulean jewel
#

Apache is simply a program to serve static files
it is not relevant to your "problem"
you could very well be reading the files from disk locally, you'd run into the same kind of problems

#

as Draedon said, using the watch mode (-w) will watch your project folder for changes and recompile the code every time

#

note this is something you should only use for local development, so not sure why are included the Apache server, which sounds more "production" related