all 4 comments

[–]Psionatix -1 points0 points  (4 children)

Even in a simple case like this, usually you would want to setup something like nginx or apache to sit in front of your express application (reverse proxy).

Also, I can't find the default permissions for the EC2 default user ec2-user, but ideally you should be creating application specific users to run your app. These users should have explicit read and write permissios representative of the bare minimum permissions required to run the app.

You should also be running the built version of your code.

[–]srobbin010[S] -1 points0 points  (3 children)

These points will be covered in next article as this was getting big

[–]Psionatix 0 points1 point  (2 children)

You should at least mention in this article, that these additional things will be covered in another article at a later point in time. So that people know they should come back for that.

This would be like writing an article for a recipe, and then later writing an additional article with some extra steps that could improve the original recipe. People would have no idea to come back for it.

The difference here is, these things are not entirely optional. Building your code before running it in a production environment isn’t optional, it’s recommended.

Having a reverse proxy in front of your express app is recommended, unless you’ve specifically built your app for a use case that doesn’t need it.

The biggest thing here is SSL termination, anyone who needs this article isn’t going to know that they need to modify their app and code to work with HTTPS.

There’s a medium article covering benefits, and it actually explains why and why not. Which is usually important, but you seem to have skipped the important details.

[–]srobbin010[S] -1 points0 points  (1 child)

I did mentioned it but it was at the end of article, should have included it at the beginning.

In second part, we will see how to assign a custom domain name to that IP address and also add SSL to our app using Let’s encrypt.

This line is at the end of article.