You are previewing AngularJS Deployment Essentials.
O'Reilly logo
AngularJS Deployment Essentials

Book Description

Learn how to optimally deploy your AngularJS applications to today's top hosting environments

In Detail

Whether you are brand new to deploying AngularJS applications or a seasoned veteran, this book will provide you with the skills you need to optimally structure, develop, and deploy an AngularJS application.

You'll learn how to set up your development environment, select the tools that will make up your workflow, optimize your code for production environments, and deploy your application to the leading hosting environments. By sequentially working through the steps in each chapter, you will quickly master your deployment strategy to facilitate a bulletproof workflow. With the help of illustrations that offer a play-by-play account of how to deploy your optimized application, you'll be able to successfully deploy your next AngularJS application.

By the end of this tutorial, you will have mastered the ability to deploy your AngularJS application to everywhere your users expect to see your product.

What You Will Learn

  • Form a bulletproof deployment workflow that can be repeated on future updates

  • Deploy your application as a mobile AngularJS app using the Ionic Framework

  • Build powerful tool stacks that work together to optimize your workflow

  • Employ Grunt to automate repetitive tasks such as image optimization, code minification, and packaging

  • Automatically deploy your application from to your Apache server

  • Configure your production environments to optimally serve your AngularJS applications

  • Scale and enhance your Node.js server using both the Heroku Dashboard and Toolbelt

  • Package your application as a Google Chrome app that can be run online and offline

  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.

    Table of Contents

    1. AngularJS Deployment Essentials
      1. Table of Contents
      2. AngularJS Deployment Essentials
      3. Credits
      4. About the Author
      5. About the Reviewers
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      8. 1. Our App and Tool Stack
        1. The right tools for the job
          1. Version control with Git and GitHub
          2. Node.js
            1. NPM
          3. Yeoman's workflow
            1. Yo
              1. Installing Yo
            2. Grunt
            3. Bower
          4. The Ionic framework
          5. Batarang
          6. Sublime Text and Editor integration
        2. Krakn
          1. Setting up Git and GitHub
          2. Scaffolding the app with Yo
          3. Development
          4. Views, controllers, and routes
            1. The login view
            2. The chat view
            3. The account view
            4. The menu view
            5. The about view
          5. Global controller constants
          6. Models and services
        3. Predeployment
        4. Summary
      9. 2. Deploying to Apache
        1. From local to remote
          1. Deployment destination
          2. A comparison between the local and remote setup
          3. Manual deployment
            1. FTPing from your command line
            2. FTP clients
        2. Automating deployment with GitHub and SSH
        3. Troubleshooting deployment issues
          1. A visual diff tool
          2. Using diff with Git
        4. Configuring Apache for Angular
          1. Google's PageSpeed Service for Apache
        5. Summary
      10. 3. Deploying to Heroku
        1. Setting up your Heroku environment
          1. Creating an account
          2. Heroku's dashboard
          3. Defining a new application
          4. The Heroku Toolbelt
            1. Installation
            2. SSH access
            3. New app in Toolbelt
            4. New app in dashboard
            5. Heroku branch
          5. Predeployment configuration
            1. Express
            2. Gzippo
            3. Package.json
            4. The Procfile
            5. Web.js
        2. Scaling and deploying to Heroku
          1. Dynos
            1. Scalability
          2. Add-ons
          3. Troubleshooting deployment issues
        3. Summary
      11. 4. Deploying to Firebase Hosting
        1. The Firebase setup
          1. Creating your Firebase account
          2. Using the Firebase Forge dashboard
            1. Using the Data view
            2. Using the Security Rules view
            3. Using the Simulator view
            4. Using the Analytics view
            5. Using the Simple Login view
          3. Hosting your application
            1. Using the firebase-tools CLI
              1. Configuring your Firebase environment
        2. Troubleshooting deployment issues
          1. HTTP resources served over HTTPS
        3. Summary
      12. 5. Deploying a Mobile App
        1. Context is the king
        2. What is Apache Cordova and how does it address issues?
        3. Configuring your development environment for Apache Cordova
          1. A word on Cordova's dependencies
          2. Installing Apache Cordova
          3. Installing the Android SDK
            1. Configuring the Android SDK and tools
              1. OS X configuration
              2. Windows configuration
            2. Installing an Android target and creating an emulator
        4. From Angular web applications to hybrid mobile apps with Cordova
          1. Deploying your app to an emulator
            1. Moving your code into /www
            2. Deploying your app to your physical device with Cordova
        5. From Angular web applications to mobile apps with the Cordova Chrome App toolchain
        6. Configuring your development environment for the Cordova Chrome App toolchain
          1. Packaging your Angular web application for mobile with CCA
        7. From Angular web applications to mobile apps with PhoneGap Build
        8. Publishing your application
          1. Signing your .apk file
          2. Publishing to the Google Play Store
        9. Troubleshooting deployment issues
        10. Summary
      13. 6. Deploying as Chrome Apps
        1. Why Chrome Apps?
          1. Choosing the best app type
        2. The Chrome App setup
        3. Augmenting your Angular App for Chrome
          1. The manifest.json file
            1. Icons
            2. Content security policy
            3. Other ways to customize your manifest.json file
          2. The background.js file
          3. Deploying to your Chrome instance
          4. Troubleshooting deployment issues
          5. Deploying to the Chrome Web Store
        4. Summary
      14. 7. Postdeployment
        1. Features and fixes
        2. Adding support to Google Analytics
          1. Setting up the angular-google-analytics module
          2. Deploying updates to Apache
            1. The FTP command-line interface
            2. An FTP client
            3. Git and SSH
          3. Deploying updates to Heroku
          4. Deploying updates to Firebase Hosting
          5. Deploying updates to mobile apps
            1. Deploying updates to the local emulator with Cordova
            2. Deploying updates to the physical device with Cordova
            3. Deploying updates to the local emulator with CCA
            4. Deploying updates to the physical device with CCA
            5. Building updates with PhoneGap Build
            6. Deploying updates to Google Play Store
          6. Deploying updates to Chrome App
            1. Packing updates with your local Chrome instance
            2. Deploying updates to the Chrome Web Store
        3. Summary
      15. 8. Conclusion – AngularJS Deployment Essentials
        1. Developing a dynamic tool stack
        2. Deploying early and deploying
      16. Index