files:
  "/opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh" :
    mode: "000775"
    owner: root
    group: root
    content: |
      #!/bin/bash
      function error_exit
      {
        eventHelper.py --msg "$1" --severity ERROR
        exit $2
      }

      export HOME=/home/ec2-user
      echo "export home"

      sudo curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash -
      sudo yum install -y nodejs
