Deploying an AngularJS Application to Appcelerator Node.ACSClearly Innovative | Web and Mobile Development

Deploying an AngularJS Application to Appcelerator Node.ACS Environment

The Appcelerator Node.ACS environment allows you to host node.js application with Appcelerator custom MVC or regular NodeJS applications. Additional information can be found on the Appcelerator Website here Node.ACS Quick Start

Working on an application for a client, we needed a simple management website that was more user friendly than the default Appcelerator Cloud Services (ACS) console. as a javascript shop we use node and angularjs. The option of using another vendor for hosting was suggested, but we were interested in seeing if the existing Appcelerator environment could meet our needs.

Follow the instructions below these instructions assume you used Grunt to create the basic project structure and are packaging the app for deployment using  grunt build:dist

1) Enter the grunt command to build the application from project root  grunt build:dist

2) Enter the following commands to copy needed files to dist  directory, this assumes you placed them in a folder called  acs_deploy

Source Code for app.js

 Source Code for package.json

 

3) Login to acs, using your appcelerator credentials acs login

4) Deploy app to acs using the following command  acs publish -d . --force

The output from the publish command should provide you with a url where the application can be accessed from a web browser

Additional Information

Using node-static  to create a small webserver which is used to serve the static pages of teh angular JS application. See the github repo fpr more information – https://github.com/cloudhead/node-static


Full Source Code for the supporting files are available here