1.0.0 • Published 3 years ago

rum_server v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Project Title

A NodeJS web service that handles Real user monitoring and exposes a RESTFull API.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  1. Make sure you have at least Chrome v59+ installed on your host system.

  1. NodeJS + NPM
  2. check installs worked, run on you console the following commands:

    • npm -v
    • node -v

    verify that all above commands return valid output.

  3. install Jest

    • npm install --save-dev babel-cli babel-preset-env jest supertest

Installing

clone this repository

Running the service

go to the directory where you cloned this repository and run:

npm run start

this will init the NodeJS service on localhost:3000/ you can now work with its API

API Doc

POST /screenshot

sample request data(JSON):

    {  
        "url":"http://www.cbs.com",  
        "width": 1440,  
        "height": 900,  
        "scale_factor": 0,  
        "is_mobile": false,  
        "fit_window": false,  
        "delay": 10000,  
        "fullPage": true  
    }

response:

base64 stream for the screenshot taken

POST /page_content

sample request data(JSON):

    {
        "url":"http://www.cbs.com",
        "width": 1440,
        "height": 900,
        "scale_factor": 0,
        "is_mobile": false,
        "fit_window": false,
        "delay": 3000
    }

response:

HTML content of the given url in request after loaded and delayed

Arena - Job queue Admin

GRUMi Gateway works with bee-queue as its job queue. To monitor and manage the queue goto:

http(s)://< server-host >:4567

Contributing

Versioning

Authors

  • Sharon Abu - Initial work