简体   繁体   中英

Deploy app on AWS EC2

I am using Windows 10. I have created an AWS EC2 Linux instance, following the instructions on the AWS tutorial . I have successfully connected to my instance with WinSCP , but now I don't know how to upload my app (only javascript) to the server and make it run. The tutorial only explains how to use Drupal. I do not want to use Drupal. The 3rd party explanations are specific to certain frameworks. Can some one please tell me what the next steps are to deploy my app?

Thank you.

Amazon EC2 is a virtual machine. For your purposes, think of it as a server. This means that it does nothing except provide you with an operating system and some "disk" space. Any applications you want on it need to be installed yourself. So, if you want to spin up your own instance and run a Javascript application, you would need to install whatever applications you need (eg Drupal, Wordpress, Apache, etc.). For starting out, I would suggest you take a look at the various AMI's that are out there, Bitnami has created a number of them. You mentioned you DON'T want to use Drupal; would you rather use Wordpress? I'm not familiar with any of the CMS'.

https://aws.amazon.com/marketplace/pp/B007IP8BKQ

Or, Bitnami has a LAMP AMI you can use.

https://aws.amazon.com/marketplace/pp/B007IN7GJA

Another way to go is to use the Elastic Beanstalk service. Beanstalk starts up an EC2 instance for you and offers a preconfigured web-server environment that you deploy your application into, one of which is Node.js. Its documentation is available here:

https://aws.amazon.com/documentation/elastic-beanstalk/

The 3rd party link you referenced was for MEAN (Mongo, Express, Angular, Node). Are you trying to setup a MEAN application? If so, Elastic Beanstalk may not be the way to go, as there will likely be a lot of configuration to get Angular and Express setup and the configuration process is not straight forward...and so an EC2 instance may be better, at least to start out with.

If it's a simple PHP backend / Javascript frontend application, Beanstalk would be fine (just be sure that you're NOT deploying code directly to the EC2 instance that gets created as it will NOT persist indefinitely). Any changes to the website or JS code must be deployed via the Beanstalk application.

So, without knowing what environment you're looking to host your application in, it's impossible to provide any further advice, but you can start there.

If you want to provide any further information on what you're trying to do, edit your question and I can help further.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM