Skip to content
Rookout official tutorial for using Node.js
Branch: master
Clone or download
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.
.circleci
.jenkins
src
.eslintignore
.eslintrc.json
.gitignore
BUGHUNT.md
Dockerfile
LICENSE
Makefile
README.md
index.js
package-lock.json
package.json

README.md

Rookout official tutorial for using Node.JS

CircleCI License Docs GitHub version

This is the official rookout Node.JS tutorial

Prerequisites

  1. Docker - https://www.docker.com/get-docker
  2. Node.JS 10 + NPM

Installation

  1. Clone this repo
git clone https://github.com/Rookout/tutorial-nodejs.git
cd tutorial-nodejs
  1. Set your Rookout token in an ENV variable
export ROOKOUT_TOKEN=YOUR_TOKEN_IN_HERE
  1. Build and run the app
  • Option 1 - Without Docker:
npm start
  • Option 2 - Running with docker
docker run -p 4000:4000 -e ROOKOUT_TOKEN=$ROOKOUT_TOKEN rookout/tutorial-nodejs

Usage

  • After running the app 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

    Adding source code

    1. Click on Add source
    2. Choose source control
      • Github
        • Click on Connect
        • Authorize O-Auth
        • Fill Repository Owner
        • Click Repository and 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 8000 or choose your own
        • Run your local server e.g. simple-https -p 8000 in the right directory
        • Click on Connect to Server

  • Open the file src/handlers/homePage.js

  • Add a Snapshot Breakpoint to line 5 by clicking next the the line number in the file viewer

  • Looking at the right-hand pane Breakpoints, you will see the breakpoint 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 breakpoint

  • Check the bottom pane Messages and you'll see the snapshot 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.

Common Pitfalls

  • Breakpoint 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
  • Breakpoint status is GRAY -- No app connected. Make sure you have inserted the Rookout Token in the right place and that connection is made properly.

Want to learn more ?

License

APACHE 2

You can’t perform that action at this time.