Skip to content
Advertisement

JavaScript vs Node.js

I have simple “to-do” application written in JavaScript and HTML. I don’t even have CSS file, just have bit of in-line style in index.html file where I have linked my JavaScript file. No database or any other stuff needed. Simple app using vanilla JavaScript and HTML.

I have AWS free tier account and tried zipping .js and .html files and deploying to AWS Elastic Beanstalk but it’s converting into node.js and keep looking for JSON file and deployment is unsuccessful.

  1. Is this called JavaScript app or Node.js app in real world?
  2. How do I deploy it in AWS?

Advertisement

Answer

As other have answered (without telling you how to do it) the solution is static web file hosting. You do not need to deploy your app to Elastic Beanstalk as your JavaScript are not executed on the server. They just need to be served to a client where they will execute in the client’s browser.

Amazon S3 is the most cost effective way to serve static HTML website.

The easiest way to setup S3 and deploy your application is to use amplify command line. See the detailed procedure at https://aws-amplify.github.io/docs/cli/hosting

To learn more about Amazon S3 web hosting, please read this https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html

Advertisement