Deploying Node\Express app to production – is it just copying?

Issue

this is first time Im doing this, so I have to wonder:

Does "deploying to production", when it comes to a Node JS app – simply means copying the .js files to production? there’s no ‘build’ operation or anything like that? and what about sensitive information, like usernames, password, etc? on dev its in an ENV file. Do I just move it to prod? somehow I think I missed something big…

Thank You!

Solution

I think the comment of Kevin B is correct. The Javascript code doesn’t need to compile or build so this step does not exist.

We could have, however, a test phase before deploying to production. Or, if you are using Typescript, a "build" phase to compile the code to Javascript.

For the environment variable, you’re correct.

Answered By – Đăng Khoa Đinh

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published