Skip to content

ntkog/demo_custom_streamserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisites

  • NGROK for tunneling local connetions and expose the StreamServer to Internet.
  • NodeJS

Instructions

Clone this repo

git clone
cd demo_custom_streamserver

Install NodeJS dependencies

For custom streamserver

npm i

For websocket server (In ws_server folder)

cd ws_server
npm i

Edit SERVICE_CONF in index.js with proper data.

const SERVICE_CONF = {
  name : "test",
  out_sr : {
    wkid : 102100,
    latestWkid : 3857
  },
  port : process.env["NGROK"] ? 9000 : 9000,
  host : process.env["NGROK"]  || "localhost",
  protocol : process.env["NGROK"] ? "https" : "http",
  wsUrl : "ws://localhost:8001"
};

Start ngrok tunneling on port 9000

ngrok http 9000

Copy the ngrok dynamic domain (It will be where the server will be exposed to the internet)

how to copy ngrok dynamic domain

Start websocket server

cd ws_server
node track_timeslot.js 8001

In this example, 8001 is the port you've already configure in SERVICE_CONF

Start custom streamserver

NGROK=fa4a3c52.ngrok.io node index.js "4.13"

Replace fa4a3c52.ngrok.io with your ngrok dynamic domain

start custom streamserver

Enjoy! :-)

About

Demo for Berlin Esri Devsummit 2019

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published