module extension can be ignored when we import module but with typescript to start running server "start":"ts-node-esm app.ts",
We need to set file extension otherwise we will get an error "Cannot find module", if I use typescript then I probably will set .ts as module extension but again it won't work because when module is compiled it will have .js extension and won't have .ts extension anymore, so to fix this we can set extension as .js even if the module originally has .ts extenstion
import router from "./Routes/index";
module extension can be ignored when we import module but with typescript to start running server "start":"ts-node-esm app.ts", We need to set file extension otherwise we will get an error "Cannot find module", if I use typescript then I probably will set .ts as module extension but again it won't work because when module is compiled it will have .js extension and won't have .ts extension anymore, so to fix this we can set extension as .js even if the module originally has .ts extenstion
import router from "./Routes/index.js";