How to deploy an app using ionic framework to Amazon? (elastic beanstalk prefered)

I have a node.js app, which creates HTTP server and handles socket connections, and I have an Ionic Framework Application (angular.js) Could you please give me some guide how to run it on AWS? On my local system, I simply run the command - node app.js and then go to ionic app folder and type ionic serve

Please, I'm finally stacked trying dozen of ideas and even Amazon Support could not help me, for some reason.

Elastic Beanstalk(EB) support node.js already but I didn't see angular.js in the list, and seems ionic is a plug-in/framework for angular.js (need you confirm) which is not included as well.

So here is my thought to fix your problem (I didn't implement it, and need your confirmation)

With the config file, you can customise EB and install the missing package.

Take a try and let me know the result.

More, if you can take time to read the documents about AWS Service Cloudformation and its template. It will help you a lot to understand how EB works.

I wanted to create a web app using node.js as a server and Ionic Framework as front-end framework, and finally run this everything on AWS ElasticBeasntalk

Ionic is written with AngularJS (very useful free course by CodeSchool). AngularJS is a library, which you upload to user's browser including it as <script/> There is no need to install it on the server environment.

Here is what I finally came up with:

  1. You create your node application app.js - it's the server side.
  2. Copy /www folder from ionic project
  3. In app.js you need to through this folder and the index.html file to the server, which is initialized by your app.js

app.get('/', function (request, response) { response.sendFile(__dirname + "/public/index.html"); });

app.use(express.static(__dirname, 'public'));

Now you have two .js applications - Angular (front-end) and Node (back-end) in one repository and running by simple node app.js command.

All you need to to do to deploy it to ElasticBeanstalk - create a package.json file, zip you project, create a Node.js environment and upload this version to your running environment.

P.S. To zip properly - go into your folder and use zip -r 1.zip . command

P.P.S. package.son file sample:

{
  "name": "myApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node app.js"
  },
  "dependencies": {
    "express": "4.10.6",
    "request":"2.51.0",
    "redis":"0.12.1"
    ----your libraries here ---
  }
}