Skip to content

gakadam/estimator_tutorials

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Get your Estimator powered app running in 5 minutes

Live Demo : click me!

Prerequisite.

Steps to get your app running

Step 1

clone the repository

$ git clone https://github.com/throughputer/estimator_tutorials.git
Step 2

change directory

$ cd rock-paper-scissor
Step 3

open the file js/rps.js using any editor

$ vim js/rps.js
Step 4

go the line number 75

 To utilize your access to a ThroughPuter Estimator microservice, provide your API key here, HOWEVER...
 IMPORTANT!!! It is your responsibility to keep your API key secret. This code is visible in a user's web browser,
 and this demo is not intended to be hosted publicly with your private key.
this.prediction = new Prediction(
      4,
      true,
      `wss://passgraf.com:2083/ws/<Insert-your-API-key>`,
      predictionCB,
      wsReady
    );
Step 5

Replace <Insert-your-API-key> with your API key. You can find your API key at estimatorlab.com/estimator

Note: Always keep your API key secret. This demo app is NOT built to be hosted publicly. Generally, unlike this demo, only the back end of your web application should connect to your private Estimator microservice.
Step 6

Start a python3 http server (or any http server). You can install Python3 from here

python3 -m http.server

You should see the following, showing that your http server is running on Port 8000:

Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
Step 7

Open your favorite browser and enter the URL:

http://localhost:8000/

You can see a RPS app running with your API key. Check your Dashboard to view the number of calls made to the estimator microservice & keep track of your free credits consumption. Note: The first 3 clicks are used to train the online Machine Learning engine and not counted towards your usage.

Questions? We can be reached at [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 73.0%
  • HTML 21.5%
  • CSS 5.5%