This is the official rookout Node.JS tutorial
- Docker - https://www.docker.com/get-docker
- Node.JS v8.X.X + NPM
- Clone this repo
git clone https://github.com/Rookout/tutorial-nodejs.git
cd tutorial-nodejs- Set your agent token in an ENV variable
export ROOKOUT_TOKEN=YOUR_TOKEN_IN_HERE- Build the app then run the agent & app
- Option 1 - Running the app and agent with docker compose
docker-compose up- Options 2 - Without Docker (Linux only):
make -j run-prod- Options 3 - Running the agent ONLY in docker and the app locally (All platforms)
docker-compose up rookout-agent
# To run in the background: docker-compose up -d rookout-agent
make start-web-
After running the app & agent go to https://app.rookout.com/ and Log In
-
Add the source code according to the instructions using the left pane Source View
More details
- Click on Add source
- Choose source control
- Github
- Click on Connect
- Authorize O-Auth
- Fill
Repository Owner - Click
Repositoryand choose from the dropdown menu - Click Next
- Choose the desired branch
- Click View Repository
- Local FileSystem - Server
- Click on Setup Server
- Choose a supported HTTP Server (Node.js)
- Leave the default port
8000or choose your own - Run your local server e.g.
simple-https -p 8000in the right directory - Click on Connect to Server
- Github
-
Open the file
src/handlers/homePage.js -
Add a default (Dump Frame) rule to line 5 by clicking next the the line number in the file viewer
-
Looking at the right-hand pane Rules, you will see the rule and the line number where you added it - it should be GREEN.
- If this is not the case, click here to see how to fix that
-
Go the the app page http://localhost:4000/ in order to trigger the rule
-
Check the bottom pane Messages and you'll see the dumpframe you just added, as it was triggered by the handler of the web page when you accessed it
Go through the bug list and follow instructions to see some basic use cases.
- Rule status is RED -- Hash mismatch. It means the file used in the server is not the same file used from github/local server in app.rookout.com
- Rule status is GRAY -- No rook connected to the agent. Make sure you have inserted the token in the right place and that connection is made properly.
- Our documentation for more information
- our deployment examples for platform-specific integration examples