Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.ebextensions
node-example
README.md

README.md

Quickstart for Elastic Beanstalk Node + Rookout

A sample application for using Rookout + Node on AWS Elastic Beanstalk.

Before following this guide we recommend reading the basic Node + Rookout guide

Adding Rookout to an existing EBS Project

There are 2 simple steps to integrate Rookout into your existing node beanstalk application:

  1. Add the rookout npm dependency and require it in the entry file

  2. Add our .ebextensions standalone config script available here

    • The script download and install the Rookout ETL Agent

The process is described here : Rookout Integration Process

App Setup

Clone or download the node-example folder and run these commands inside it:

  1. Installing dependencies:
    $ npm install

IMPORTANT: If you are building on a MacOS/Windows machine, npm will compile native binaries for this platform. AWS elastic beanstalk runs on Linux machine and thus needs the linux compiled binaries. To build AWS Lambda compatible native extensions, simply run the following command line:

 docker run -v `pwd`:`pwd` -w `pwd` -i -t lambci/lambda:build-nodejs8.10 npm install
  1. Run:

    $ npm start
  2. Go to https://app.rookout.com and start debugging!

Running on Elastic Beanstalk

  1. Clone or download the node-example folder

  2. Zip up the contents in order to upload to EBS platform : zip -r node-example.zip . -x node_modules/\*

You can use either the AWS Management Console or the EB CLI to launch the node application. Scroll down for EB CLI instructions.

To deploy with the AWS Management Console
  1. Open the Elastic Beanstalk Management Console

  2. Upload the source (node-example.zip) bundle when creating a new Beanstalk app

  3. Choose 'Node' Platform (Make sure that the version you are choosing supports rook)

  4. Make sure everything worked by accessing the url provided by Elastic Beanstalk after build completed

  5. Go to http://app.rookout.com and start debugging!

Rookout Integration explained

We have added Rookout to the original project by:

  1. Adding the Rookout SDK (aka "Rook") to the package.json file available on npm:

    $ npm install --save rookout
  2. Adding a require statement to the project entry file app.ts:

    const rook = require("rookout/auto_start");
You can’t perform that action at this time.