rum_server v1.0.0
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
Make sure you have at least Chrome v59+ installed on your host system.
- NodeJS + NPM
- sudo apt-get update
- sudo apt-get install npm
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- sudo apt-get install -y nodejs
check installs worked, run on you console the following commands:
- npm -v
- node -v
verify that all above commands return valid output.
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
3 years ago