What is the current best practice to deploy TypeScript Node.js applications in production without docker?
In case of using git there is the problem that you need to install all dependencies in order to build the project since the types are required which are usually installed as devDependencies. This also means that you install modules for testing, linting, etc. which are not required at all in production.
I am thinking about adding all types as dependencies which then would allow to run npm install --production
in order to avoid installing all devDependencies and still be able to build the project by running npm run build
.
Another solution I was thinking about was deployment via npm, similiar to how TypeScript node modules are released and installed but that solution also seems suboptimal.