Folder structure:
Now onto the problem i'm facing...
I'm very new to Typescript but was able to convert many of these files including server.js and script.js (the main two files of this program) to Typescript. They currently have no errors pre-compilation, but the home.ejs file (in views) can not find the script.js file.
When using in my ejs files, should i aim to the script.js that has been compiled down? Or should I aim to the script.ts in my src folder? I was able to link to the script.js but when I converted the file to TS, the EJS file can no longer find it in browser.
Here is the code that is relevant for my home.ejs file:
<body>
<script src="/dist/script.js"></script>
<script src="/launch.js"></script>
</body>
And here is a screenshot, if it helps, of my current structure: Image of folder structure
For the line, I have tried all of these but they don't work:
<script src="/dist/script.js"></script>
<script src="./dist/script.js"></script>
<script src="../dist/script.js"></script>
<script src="../../dist/script.js"></script>
Also knowing if node should run the server.js (compiled) file or the server.ts (uncompiled) would be helpful!