SlideShare a Scribd company logo
Copyright © 2016 M/Gateway Developments Ltd
EWD 3 Training Course
Part 36
Accessing REST and
Web Services from a
QEWD Application
Rob Tweed
Director, M/Gateway Developments Ltd
Twitter: @rtweed
Copyright © 2016 M/Gateway Developments Ltd
Interactive v REST Apps
• Interactive
– QEWD back-end has direct access to
database and business logic
• Possibly including legacy application logic
• REST
– Application logic is on a different server,
accessed via REST / Web Service calls
– QEWD back-end must make REST/HTTP
requests to a separate server
Copyright © 2016 M/Gateway Developments Ltd
Self-contained Interactive App
Browser QEWD
socket.io
socket.io
Caché
or GT.Mewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.js
Globals Functions
ewd-client
token
Legacy
App
Logic
Express
Worker
Copyright © 2016 M/Gateway Developments Ltd
Self-contained Interactive App
Browser QEWD
socket.io
socket.io
Caché,
GT.M or
Redis
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.js
Global
storage
ewd-client
token
Express
Worker
Copyright © 2016 M/Gateway Developments Ltd
QEWD REST back-end
HTTP
Client
QEWD
Caché
or GT.M
ewd-qoper8
queue
Custom Worker
Module
testWebService.js
Globals Functions
Legacy
App
Logic
HTTP
Express
Worker
Copyright © 2016 M/Gateway Developments Ltd
ewd-qoper8-vistarpc back-end
HTTP
Client
ewd-qoper8-vistarpc
Caché
or GT.M
ewd-qoper8
queue
Custom Worker
Module
vista-worker-module-.js
Interface
Function
VistA
RPCs
HTTP
Express
Worker
Copyright © 2016 M/Gateway Developments Ltd
QEWD accessing REST Service
Browser QEWD
socket.io
socket.io
Caché,
GT.M or
Redis
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.jsewd-client
token
Express
Separate
REST/Web
Service
HTTP
Worker
Copyright © 2016 M/Gateway Developments Ltd
QEWD accessing another QEWD-
based REST Service
Browser QEWD
socket.io
socket.io
Caché,
GT.M or
Redis
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.jsewd-client
token
Express
HTTP
QEWD
Caché,
GT.M or
Redis
ewd-qoper8
queue
Custom Worker
Module
testWebService.js
Globals Functions
Legacy App
Logic
Express
Worker
Worker
Copyright © 2016 M/Gateway Developments Ltd
ewd-xpress accessing ewd-qoper8-vistarpc
Browser QEWD
socket.io
socket.io
Caché,
GT.M or
Redis
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.jsewd-client
token
Express
HTTP
ewd-qoper8-vistarpc
Caché
Or GT.M
ewd-qoper8
queue
Custom Worker
Module
vista-worker-module-.js
Interface
Function
VistA
RPCs
Express
Worker
Worker
Copyright © 2016 M/Gateway Developments Ltd
QEWD accessing a REST Service
Browser QEWD
socket.io
socket.io
Caché,
GT.M or
Redis
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.jsewd-client
token
Express
Separate
REST/Web
Service
HTTP
So what do you have
to do in here to make
this possible?
Worker
Copyright © 2016 M/Gateway Developments Ltd
HTTP Client access from Node.js
• Your back-end message handler function
needs to act as an HTTP client
• Node.js provides the libraries for this
– But they are very low-level and can be tricky
to use
Copyright © 2016 M/Gateway Developments Ltd
HTTP Client access from Node.js
• Your back-end message handler function
needs to act as an HTTP client
• Node.js provides the libraries for this
– But they are very low-level and can be tricky
to use
• Better/Easier to use a pre-built module
that re-packages the Node.js libraries
– request is probably the best / most used
Copyright © 2016 M/Gateway Developments Ltd
Install the request module
• cd C:qewd (or cd ~/qewd)
• npm install request
Copyright © 2016 M/Gateway Developments Ltd
Let's try it with a test REST service
• jsonplaceholder
– A useful mock/test service that you can freely
use
– https://jsonplaceholder.typicode.com/
• We'll use its GET /posts/1 service
– Try it with a browser:
– https://jsonplaceholder.typicode.com/posts/1
Copyright © 2016 M/Gateway Developments Ltd
Create a QEWD app
• Simple web page with a button
• When the button is clicked, we'll send a
message to the QEWD back end
• The handler for the message will invoked
the jsonplaceholder service and return the
response to the browser
Copyright © 2016 M/Gateway Developments Ltd
Ensure you have ewd-client installed
• See Parts 5a and 5b of this course for
details
Copyright © 2016 M/Gateway Developments Ltd
We'll call our app restDemo
• Create an application directory for its
client-side HTML and JavaScript files:
– cd ~/qewd/www
– mkdir restDemo
– cd restDemo
Copyright © 2016 M/Gateway Developments Ltd
Create index.html
<html>
<head>
<title>QEWD REST Demo</title>
</head>
<body>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="/ewd-client.js"></script>
<script src="app.js"></script>
<button id="testBtn">Click Me</button>
<pre id="content">
Content will go here
</pre>
</body>
</html>
Copyright © 2016 M/Gateway Developments Ltd
Create app.js
$(document).ready(function() {
EWD.log = true;
EWD.on('ewd-registered', function() {
$('#testBtn').on('click', function(e) {
var message = {type: 'testRestService'};
EWD.send(message, function(messageObj) {
$('#content').text(JSON.stringify(messageObj.message, null, 2));
});
});
});
EWD.start('restDemo', $, io);
});
Copyright © 2016 M/Gateway Developments Ltd
Create app.js
$(document).ready(function() {
EWD.log = true;
EWD.on('ewd-registered', function() {
$('#testBtn').on('click', function(e) {
var message = {type: 'testRestService'};
EWD.send(message, function(messageObj) {
$('#content').text(JSON.stringify(messageObj.message, null, 2));
});
});
});
EWD.start('restDemo', $, io);
});
Define the click handler
for the button
Copyright © 2016 M/Gateway Developments Ltd
Create app.js
$(document).ready(function() {
EWD.log = true;
EWD.on('ewd-registered', function() {
$('#testBtn').on('click', function(e) {
var message = {type: 'testRestService'};
EWD.send(message, function(messageObj) {
$('#content').text(JSON.stringify(messageObj.message, null, 2));
});
});
});
EWD.start('restDemo', $, io);
});
When clicked, it sends
a message of type
'testRestService'
Copyright © 2016 M/Gateway Developments Ltd
Create app.js
$(document).ready(function() {
EWD.log = true;
EWD.on('ewd-registered', function() {
$('#testBtn').on('click', function(e) {
var message = {type: 'testRestService'};
EWD.send(message, function(messageObj) {
$('#content').text(JSON.stringify(messageObj.message, null, 2));
});
});
});
EWD.start('restDemo', $, io);
});
When response is
received from QEWD,
display it within the
content <pre> tag
Copyright © 2016 M/Gateway Developments Ltd
Now create the back-end handler
• cd ~/qewd/node_modules
• Create a file named restDemo.js
Copyright © 2016 M/Gateway Developments Ltd
Contents of restDemo.js
var request = require('request');
module.exports = {
handlers: {
testRestService: function(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
}
};
Copyright © 2016 M/Gateway Developments Ltd
Create restDemo.js
var request = require('request');
module.exports = {
handlers: {
testRestService: function(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
}
};
Load the request
module
Copyright © 2016 M/Gateway Developments Ltd
Create restDemo.js
var request = require('request');
module.exports = {
handlers: {
testRestService: function(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
}
};
Define the handler
function for the
testRestService
message that will be
sent when the button
is clicked
Copyright © 2016 M/Gateway Developments Ltd
Create restDemo.js
var request = require('request');
module.exports = {
handlers: {
testRestService: function(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
}
};
Send the GET
request to the
jsonplaceholder
service using the
request module
Copyright © 2016 M/Gateway Developments Ltd
Create restDemo.js
var request = require('request');
module.exports = {
handlers: {
testRestService: function(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
}
};
Return the results by
invoking the finished()
function.
Copyright © 2016 M/Gateway Developments Ltd
Create restDemo.js
var request = require('request');
module.exports = {
handlers: {
testRestService: function(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
}
};
Make sure you invoke
the finished() function
from within request's
callback. QEWD must
not release the
worker until after the
REST service
response has been
received
Copyright © 2016 M/Gateway Developments Ltd
Try it out
Click the button
and this should
appear – the
response from
jsonplaceholder
Copyright © 2016 M/Gateway Developments Ltd
Check the JavaScript Console
Message sent
to QEWD when
the button was
clicked
Copyright © 2016 M/Gateway Developments Ltd
Check the JavaScript Console
Response from
worker,
containing
content from
jsonplaceholder
Copyright © 2016 M/Gateway Developments Ltd
Create a REST proxy
• Instead of an interactive QEWD
application, let's create a QEWD-based
REST API that acts as a proxy to the
jsonplaceholder service
Copyright © 2016 M/Gateway Developments Ltd
Create a REST proxy
• Instead of an interactive QEWD
application, let's create a QEWD-based
REST API that acts as a proxy to the
jsonplaceholder service
• We can do this by:
– Amending our back-end restDemo.js module
– Adding a route to our QEWD startup file
• Let's route the URL /api/proxy to a handler in
restDemo.js
Copyright © 2016 M/Gateway Developments Ltd
Amend node_modules/restDemo.js
var request = require('request');
function testRestService(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
module.exports = {
restModule: true,
handlers: {
proxy: function(messageObj, finished) {
testRestService(messageObj, null, null, finished);
},
testRestService: function(messageObj, session, send, finished) {
testRestService(messageObj, session, send, finished);
}
}
};
Copyright © 2016 M/Gateway Developments Ltd
Amend node_modules/restDemo.js
var request = require('request');
function testRestService(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
module.exports = {
restModule: true,
handlers: {
proxy: function(messageObj, finished) {
testRestService(messageObj, null, null, finished);
},
testRestService: function(messageObj, session, send, finished) {
testRestService(messageObj, session, send, finished);
}
}
};
Separate out the
testRestService
function
Copyright © 2016 M/Gateway Developments Ltd
Amend node_modules/restDemo.js
var request = require('request');
function testRestService(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
module.exports = {
restModule: true,
handlers: {
proxy: function(messageObj, finished) {
testRestService(messageObj, null, null, finished);
},
testRestService: function(messageObj, session, send, finished) {
testRestService(messageObj, session, send, finished);
}
}
};
Declare this module
to be a REST one.
Note: it can also
support interactive
apps even with this
setting
Copyright © 2016 M/Gateway Developments Ltd
Amend node_modules/restDemo.js
var request = require('request');
function testRestService(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
module.exports = {
restModule: true,
handlers: {
proxy: function(messageObj, finished) {
testRestService(messageObj, null, null, finished);
},
testRestService: function(messageObj, session, send, finished) {
testRestService(messageObj, session, send, finished);
}
}
};
Define a handler for
the /api/proxy URL
by defining a handler
function named proxy
Copyright © 2016 M/Gateway Developments Ltd
Amend node_modules/restDemo.js
var request = require('request');
function testRestService(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
module.exports = {
restModule: true,
handlers: {
proxy: function(messageObj, finished) {
testRestService(messageObj, null, null, finished);
},
testRestService: function(messageObj, session, send, finished) {
testRestService(messageObj, session, send, finished);
}
}
};
The proxy function
invokes the externalised
original function which
calls out to the
jsonplaceholder service
Copyright © 2016 M/Gateway Developments Ltd
Amend node_modules/restDemo.js
var request = require('request');
function testRestService(messageObj, session, send, finished) {
var options = {
url: 'https://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
json: true
};
request(options, function(error, response, body) {
if (error) {
finished({error: error});
}
else {
finished(body);
}
});
}
module.exports = {
restModule: true,
handlers: {
proxy: function(messageObj, finished) {
testRestService(messageObj, null, null, finished);
},
testRestService: function(messageObj, session, send, finished) {
testRestService(messageObj, session, send, finished);
}
}
};
Edit our original
testRestService
message handler
to also call the
now externalised
function
Copyright © 2016 M/Gateway Developments Ltd
Edit your QEWD startup file
var config = {
managementPassword: 'keepThisSecret!',
serverName: 'QEWD REST Server',
port: 8080,
poolSize: 2,
database: {
type: 'redis'
}
};
var routes = [
{path: '/api', module: 'restDemo'}
];
var qewd = require('qewd').master;
qewd.start(config, routes);
Add the route for
the /api URL prefix
We want it to use
handler functions in
our restDemo.js
module
Copyright © 2016 M/Gateway Developments Ltd
Edit your QEWD startup file
var config = {
managementPassword: 'keepThisSecret!',
serverName: 'QEWD REST Server',
port: 8080,
poolSize: 2,
database: {
type: 'redis'
}
};
var routes = [
{path: '/api', module: 'restDemo'}
];
var qewd = require('qewd').master;
qewd.start(config, routes);
Add routes
to the QEWD
start() function
Copyright © 2016 M/Gateway Developments Ltd
Restart QEWD
• Try the original interactive application
• It should still work
Copyright © 2016 M/Gateway Developments Ltd
Restart QEWD
• Try the original interactive application
• It should still work
• Now try the REST proxy…
Copyright © 2016 M/Gateway Developments Ltd
Try the REST proxy
It also works!

More Related Content

What's hot

EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
Rob Tweed
 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
Rob Tweed
 
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWDEWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
Rob Tweed
 
EWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWDEWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWD
Rob Tweed
 
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication
EWD 3 Training Course Part 10: QEWD Sessions and User AuthenticationEWD 3 Training Course Part 10: QEWD Sessions and User Authentication
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication
Rob Tweed
 
EWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWDEWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWD
Rob Tweed
 
EWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD ApplicationsEWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD Applications
Rob Tweed
 
EWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a ServiceEWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a Service
Rob Tweed
 
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
Rob Tweed
 
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDEWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
Rob Tweed
 
EWD 3 Training Course Part 2: EWD 3 Overview
EWD 3 Training Course Part 2: EWD 3 OverviewEWD 3 Training Course Part 2: EWD 3 Overview
EWD 3 Training Course Part 2: EWD 3 Overview
Rob Tweed
 
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging CycleEWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
Rob Tweed
 
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService FunctionalityEWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
Rob Tweed
 
EWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient Mode
Rob Tweed
 
EWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsEWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIs
Rob Tweed
 
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
Rob Tweed
 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
Rob Tweed
 
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is StartedEWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
Rob Tweed
 
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
Rob Tweed
 
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesEWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
Rob Tweed
 

What's hot (20)

EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
 
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWDEWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
 
EWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWDEWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWD
 
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication
EWD 3 Training Course Part 10: QEWD Sessions and User AuthenticationEWD 3 Training Course Part 10: QEWD Sessions and User Authentication
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication
 
EWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWDEWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWD
 
EWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD ApplicationsEWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD Applications
 
EWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a ServiceEWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a Service
 
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
 
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDEWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
 
EWD 3 Training Course Part 2: EWD 3 Overview
EWD 3 Training Course Part 2: EWD 3 OverviewEWD 3 Training Course Part 2: EWD 3 Overview
EWD 3 Training Course Part 2: EWD 3 Overview
 
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging CycleEWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
 
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService FunctionalityEWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
 
EWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient Mode
 
EWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsEWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIs
 
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
 
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is StartedEWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
 
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
 
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesEWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
 

Viewers also liked

EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
Rob Tweed
 
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage DatabasesEWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
Rob Tweed
 
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses
EWD 3 Training Course Part 9: Complex QEWD Messages and ResponsesEWD 3 Training Course Part 9: Complex QEWD Messages and Responses
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses
Rob Tweed
 
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global StorageEWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
Rob Tweed
 
EWD 3 Training Course Part 12: QEWD Session Timeout Control
EWD 3 Training Course Part 12: QEWD Session Timeout ControlEWD 3 Training Course Part 12: QEWD Session Timeout Control
EWD 3 Training Course Part 12: QEWD Session Timeout Control
Rob Tweed
 
EWD 3 Training Course Part 3: Summary of EWD 3 Modules
EWD 3 Training Course Part 3: Summary of EWD 3 ModulesEWD 3 Training Course Part 3: Summary of EWD 3 Modules
EWD 3 Training Course Part 3: Summary of EWD 3 Modules
Rob Tweed
 
EWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session LockingEWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session Locking
Rob Tweed
 
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORSEWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
Rob Tweed
 
EWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven IndexingEWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven Indexing
Rob Tweed
 
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
Rob Tweed
 
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf NodesEWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
Rob Tweed
 

Viewers also liked (11)

EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
 
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage DatabasesEWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
 
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses
EWD 3 Training Course Part 9: Complex QEWD Messages and ResponsesEWD 3 Training Course Part 9: Complex QEWD Messages and Responses
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses
 
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global StorageEWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
 
EWD 3 Training Course Part 12: QEWD Session Timeout Control
EWD 3 Training Course Part 12: QEWD Session Timeout ControlEWD 3 Training Course Part 12: QEWD Session Timeout Control
EWD 3 Training Course Part 12: QEWD Session Timeout Control
 
EWD 3 Training Course Part 3: Summary of EWD 3 Modules
EWD 3 Training Course Part 3: Summary of EWD 3 ModulesEWD 3 Training Course Part 3: Summary of EWD 3 Modules
EWD 3 Training Course Part 3: Summary of EWD 3 Modules
 
EWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session LockingEWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session Locking
 
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORSEWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
 
EWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven IndexingEWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven Indexing
 
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
 
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf NodesEWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
 

Similar to EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD application

Day In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js Developer
Edureka!
 
Day in a life of a node.js developer
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developer
Edureka!
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
Sam Brannen
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tier
Rob Tweed
 
How to implement email functionalities with Mailjet api
How to implement email functionalities with Mailjet apiHow to implement email functionalities with Mailjet api
How to implement email functionalities with Mailjet api
E Boisgontier
 
An approach to responsive, realtime with Backbone.js and WebSockets
An approach to responsive, realtime with Backbone.js and WebSocketsAn approach to responsive, realtime with Backbone.js and WebSockets
An approach to responsive, realtime with Backbone.js and WebSockets
Andrei Sebastian Cîmpean
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-ons
Sami Ekblad
 
Server Side Swift - AppBuilders 2017
Server Side Swift - AppBuilders 2017Server Side Swift - AppBuilders 2017
Server Side Swift - AppBuilders 2017
Jens Ravens
 
From Ruby to Node.js
From Ruby to Node.jsFrom Ruby to Node.js
From Ruby to Node.js
jubilem
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 -  Fullstack end-to-end Test Automation with node.jsForwardJS 2017 -  Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
Mek Srunyu Stittri
 
Nodejs.meetup
Nodejs.meetupNodejs.meetup
Nodejs.meetup
Vivian S. Zhang
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
Ran Mizrahi
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
Sapna Upreti
 
Nodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web ApplicationsNodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web Applications
Budh Ram Gurung
 
5.node js
5.node js5.node js
5.node js
Geunhyung Kim
 
Timings API: Performance Assertion during the functional testing
 Timings API: Performance Assertion during the functional testing Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testing
PetrosPlakogiannis
 
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
Tim Stephenson
 
Building Progressive Web Apps for Windows devices
Building Progressive Web Apps for Windows devicesBuilding Progressive Web Apps for Windows devices
Building Progressive Web Apps for Windows devices
Windows Developer
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
Lou Sacco
 
08 ajax
08 ajax08 ajax
08 ajax
Ynon Perek
 

Similar to EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD application (20)

Day In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js Developer
 
Day in a life of a node.js developer
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developer
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tier
 
How to implement email functionalities with Mailjet api
How to implement email functionalities with Mailjet apiHow to implement email functionalities with Mailjet api
How to implement email functionalities with Mailjet api
 
An approach to responsive, realtime with Backbone.js and WebSockets
An approach to responsive, realtime with Backbone.js and WebSocketsAn approach to responsive, realtime with Backbone.js and WebSockets
An approach to responsive, realtime with Backbone.js and WebSockets
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-ons
 
Server Side Swift - AppBuilders 2017
Server Side Swift - AppBuilders 2017Server Side Swift - AppBuilders 2017
Server Side Swift - AppBuilders 2017
 
From Ruby to Node.js
From Ruby to Node.jsFrom Ruby to Node.js
From Ruby to Node.js
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 -  Fullstack end-to-end Test Automation with node.jsForwardJS 2017 -  Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
 
Nodejs.meetup
Nodejs.meetupNodejs.meetup
Nodejs.meetup
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
Nodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web ApplicationsNodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web Applications
 
5.node js
5.node js5.node js
5.node js
 
Timings API: Performance Assertion during the functional testing
 Timings API: Performance Assertion during the functional testing Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testing
 
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
 
Building Progressive Web Apps for Windows devices
Building Progressive Web Apps for Windows devicesBuilding Progressive Web Apps for Windows devices
Building Progressive Web Apps for Windows devices
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
08 ajax
08 ajax08 ajax
08 ajax
 

More from Rob Tweed

QEWD Update
QEWD UpdateQEWD Update
QEWD Update
Rob Tweed
 
Data Persistence as a Language Feature
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language Feature
Rob Tweed
 
LNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooLNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It Too
Rob Tweed
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
Rob Tweed
 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
Rob Tweed
 
EWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker ApplianceEWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker Appliance
Rob Tweed
 
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPSEWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
Rob Tweed
 
EWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database CapabilitiesEWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database Capabilities
Rob Tweed
 
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsEWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
Rob Tweed
 

More from Rob Tweed (9)

QEWD Update
QEWD UpdateQEWD Update
QEWD Update
 
Data Persistence as a Language Feature
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language Feature
 
LNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooLNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It Too
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
 
EWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker ApplianceEWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker Appliance
 
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPSEWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
 
EWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database CapabilitiesEWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database Capabilities
 
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsEWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
 

Recently uploaded

Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Peter Caitens
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
kalichargn70th171
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
Alina Yurenko
 
What is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdfWhat is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdf
kalichargn70th171
 
Boost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management AppsBoost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management Apps
Jhone kinadey
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
Maitrey Patel
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
The Comprehensive Guide to Validating Audio-Visual Performances.pdf
The Comprehensive Guide to Validating Audio-Visual Performances.pdfThe Comprehensive Guide to Validating Audio-Visual Performances.pdf
The Comprehensive Guide to Validating Audio-Visual Performances.pdf
kalichargn70th171
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
Optimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptxOptimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptx
WebConnect Pvt Ltd
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 

Recently uploaded (20)

Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
 
bgiolcb
bgiolcbbgiolcb
bgiolcb
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
 
What is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdfWhat is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdf
 
Boost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management AppsBoost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management Apps
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
The Comprehensive Guide to Validating Audio-Visual Performances.pdf
The Comprehensive Guide to Validating Audio-Visual Performances.pdfThe Comprehensive Guide to Validating Audio-Visual Performances.pdf
The Comprehensive Guide to Validating Audio-Visual Performances.pdf
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
 
Optimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptxOptimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptx
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 

EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD application

  • 1. Copyright © 2016 M/Gateway Developments Ltd EWD 3 Training Course Part 36 Accessing REST and Web Services from a QEWD Application Rob Tweed Director, M/Gateway Developments Ltd Twitter: @rtweed
  • 2. Copyright © 2016 M/Gateway Developments Ltd Interactive v REST Apps • Interactive – QEWD back-end has direct access to database and business logic • Possibly including legacy application logic • REST – Application logic is on a different server, accessed via REST / Web Service calls – QEWD back-end must make REST/HTTP requests to a separate server
  • 3. Copyright © 2016 M/Gateway Developments Ltd Self-contained Interactive App Browser QEWD socket.io socket.io Caché or GT.Mewd-session ewd-qoper8 queue Custom Worker Module demo1.js Globals Functions ewd-client token Legacy App Logic Express Worker
  • 4. Copyright © 2016 M/Gateway Developments Ltd Self-contained Interactive App Browser QEWD socket.io socket.io Caché, GT.M or Redis ewd-session ewd-qoper8 queue Custom Worker Module demo1.js Global storage ewd-client token Express Worker
  • 5. Copyright © 2016 M/Gateway Developments Ltd QEWD REST back-end HTTP Client QEWD Caché or GT.M ewd-qoper8 queue Custom Worker Module testWebService.js Globals Functions Legacy App Logic HTTP Express Worker
  • 6. Copyright © 2016 M/Gateway Developments Ltd ewd-qoper8-vistarpc back-end HTTP Client ewd-qoper8-vistarpc Caché or GT.M ewd-qoper8 queue Custom Worker Module vista-worker-module-.js Interface Function VistA RPCs HTTP Express Worker
  • 7. Copyright © 2016 M/Gateway Developments Ltd QEWD accessing REST Service Browser QEWD socket.io socket.io Caché, GT.M or Redis ewd-session ewd-qoper8 queue Custom Worker Module demo1.jsewd-client token Express Separate REST/Web Service HTTP Worker
  • 8. Copyright © 2016 M/Gateway Developments Ltd QEWD accessing another QEWD- based REST Service Browser QEWD socket.io socket.io Caché, GT.M or Redis ewd-session ewd-qoper8 queue Custom Worker Module demo1.jsewd-client token Express HTTP QEWD Caché, GT.M or Redis ewd-qoper8 queue Custom Worker Module testWebService.js Globals Functions Legacy App Logic Express Worker Worker
  • 9. Copyright © 2016 M/Gateway Developments Ltd ewd-xpress accessing ewd-qoper8-vistarpc Browser QEWD socket.io socket.io Caché, GT.M or Redis ewd-session ewd-qoper8 queue Custom Worker Module demo1.jsewd-client token Express HTTP ewd-qoper8-vistarpc Caché Or GT.M ewd-qoper8 queue Custom Worker Module vista-worker-module-.js Interface Function VistA RPCs Express Worker Worker
  • 10. Copyright © 2016 M/Gateway Developments Ltd QEWD accessing a REST Service Browser QEWD socket.io socket.io Caché, GT.M or Redis ewd-session ewd-qoper8 queue Custom Worker Module demo1.jsewd-client token Express Separate REST/Web Service HTTP So what do you have to do in here to make this possible? Worker
  • 11. Copyright © 2016 M/Gateway Developments Ltd HTTP Client access from Node.js • Your back-end message handler function needs to act as an HTTP client • Node.js provides the libraries for this – But they are very low-level and can be tricky to use
  • 12. Copyright © 2016 M/Gateway Developments Ltd HTTP Client access from Node.js • Your back-end message handler function needs to act as an HTTP client • Node.js provides the libraries for this – But they are very low-level and can be tricky to use • Better/Easier to use a pre-built module that re-packages the Node.js libraries – request is probably the best / most used
  • 13. Copyright © 2016 M/Gateway Developments Ltd Install the request module • cd C:qewd (or cd ~/qewd) • npm install request
  • 14. Copyright © 2016 M/Gateway Developments Ltd Let's try it with a test REST service • jsonplaceholder – A useful mock/test service that you can freely use – https://jsonplaceholder.typicode.com/ • We'll use its GET /posts/1 service – Try it with a browser: – https://jsonplaceholder.typicode.com/posts/1
  • 15. Copyright © 2016 M/Gateway Developments Ltd Create a QEWD app • Simple web page with a button • When the button is clicked, we'll send a message to the QEWD back end • The handler for the message will invoked the jsonplaceholder service and return the response to the browser
  • 16. Copyright © 2016 M/Gateway Developments Ltd Ensure you have ewd-client installed • See Parts 5a and 5b of this course for details
  • 17. Copyright © 2016 M/Gateway Developments Ltd We'll call our app restDemo • Create an application directory for its client-side HTML and JavaScript files: – cd ~/qewd/www – mkdir restDemo – cd restDemo
  • 18. Copyright © 2016 M/Gateway Developments Ltd Create index.html <html> <head> <title>QEWD REST Demo</title> </head> <body> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <script src="/socket.io/socket.io.js"></script> <script src="/ewd-client.js"></script> <script src="app.js"></script> <button id="testBtn">Click Me</button> <pre id="content"> Content will go here </pre> </body> </html>
  • 19. Copyright © 2016 M/Gateway Developments Ltd Create app.js $(document).ready(function() { EWD.log = true; EWD.on('ewd-registered', function() { $('#testBtn').on('click', function(e) { var message = {type: 'testRestService'}; EWD.send(message, function(messageObj) { $('#content').text(JSON.stringify(messageObj.message, null, 2)); }); }); }); EWD.start('restDemo', $, io); });
  • 20. Copyright © 2016 M/Gateway Developments Ltd Create app.js $(document).ready(function() { EWD.log = true; EWD.on('ewd-registered', function() { $('#testBtn').on('click', function(e) { var message = {type: 'testRestService'}; EWD.send(message, function(messageObj) { $('#content').text(JSON.stringify(messageObj.message, null, 2)); }); }); }); EWD.start('restDemo', $, io); }); Define the click handler for the button
  • 21. Copyright © 2016 M/Gateway Developments Ltd Create app.js $(document).ready(function() { EWD.log = true; EWD.on('ewd-registered', function() { $('#testBtn').on('click', function(e) { var message = {type: 'testRestService'}; EWD.send(message, function(messageObj) { $('#content').text(JSON.stringify(messageObj.message, null, 2)); }); }); }); EWD.start('restDemo', $, io); }); When clicked, it sends a message of type 'testRestService'
  • 22. Copyright © 2016 M/Gateway Developments Ltd Create app.js $(document).ready(function() { EWD.log = true; EWD.on('ewd-registered', function() { $('#testBtn').on('click', function(e) { var message = {type: 'testRestService'}; EWD.send(message, function(messageObj) { $('#content').text(JSON.stringify(messageObj.message, null, 2)); }); }); }); EWD.start('restDemo', $, io); }); When response is received from QEWD, display it within the content <pre> tag
  • 23. Copyright © 2016 M/Gateway Developments Ltd Now create the back-end handler • cd ~/qewd/node_modules • Create a file named restDemo.js
  • 24. Copyright © 2016 M/Gateway Developments Ltd Contents of restDemo.js var request = require('request'); module.exports = { handlers: { testRestService: function(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } } };
  • 25. Copyright © 2016 M/Gateway Developments Ltd Create restDemo.js var request = require('request'); module.exports = { handlers: { testRestService: function(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } } }; Load the request module
  • 26. Copyright © 2016 M/Gateway Developments Ltd Create restDemo.js var request = require('request'); module.exports = { handlers: { testRestService: function(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } } }; Define the handler function for the testRestService message that will be sent when the button is clicked
  • 27. Copyright © 2016 M/Gateway Developments Ltd Create restDemo.js var request = require('request'); module.exports = { handlers: { testRestService: function(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } } }; Send the GET request to the jsonplaceholder service using the request module
  • 28. Copyright © 2016 M/Gateway Developments Ltd Create restDemo.js var request = require('request'); module.exports = { handlers: { testRestService: function(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } } }; Return the results by invoking the finished() function.
  • 29. Copyright © 2016 M/Gateway Developments Ltd Create restDemo.js var request = require('request'); module.exports = { handlers: { testRestService: function(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } } }; Make sure you invoke the finished() function from within request's callback. QEWD must not release the worker until after the REST service response has been received
  • 30. Copyright © 2016 M/Gateway Developments Ltd Try it out Click the button and this should appear – the response from jsonplaceholder
  • 31. Copyright © 2016 M/Gateway Developments Ltd Check the JavaScript Console Message sent to QEWD when the button was clicked
  • 32. Copyright © 2016 M/Gateway Developments Ltd Check the JavaScript Console Response from worker, containing content from jsonplaceholder
  • 33. Copyright © 2016 M/Gateway Developments Ltd Create a REST proxy • Instead of an interactive QEWD application, let's create a QEWD-based REST API that acts as a proxy to the jsonplaceholder service
  • 34. Copyright © 2016 M/Gateway Developments Ltd Create a REST proxy • Instead of an interactive QEWD application, let's create a QEWD-based REST API that acts as a proxy to the jsonplaceholder service • We can do this by: – Amending our back-end restDemo.js module – Adding a route to our QEWD startup file • Let's route the URL /api/proxy to a handler in restDemo.js
  • 35. Copyright © 2016 M/Gateway Developments Ltd Amend node_modules/restDemo.js var request = require('request'); function testRestService(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } module.exports = { restModule: true, handlers: { proxy: function(messageObj, finished) { testRestService(messageObj, null, null, finished); }, testRestService: function(messageObj, session, send, finished) { testRestService(messageObj, session, send, finished); } } };
  • 36. Copyright © 2016 M/Gateway Developments Ltd Amend node_modules/restDemo.js var request = require('request'); function testRestService(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } module.exports = { restModule: true, handlers: { proxy: function(messageObj, finished) { testRestService(messageObj, null, null, finished); }, testRestService: function(messageObj, session, send, finished) { testRestService(messageObj, session, send, finished); } } }; Separate out the testRestService function
  • 37. Copyright © 2016 M/Gateway Developments Ltd Amend node_modules/restDemo.js var request = require('request'); function testRestService(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } module.exports = { restModule: true, handlers: { proxy: function(messageObj, finished) { testRestService(messageObj, null, null, finished); }, testRestService: function(messageObj, session, send, finished) { testRestService(messageObj, session, send, finished); } } }; Declare this module to be a REST one. Note: it can also support interactive apps even with this setting
  • 38. Copyright © 2016 M/Gateway Developments Ltd Amend node_modules/restDemo.js var request = require('request'); function testRestService(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } module.exports = { restModule: true, handlers: { proxy: function(messageObj, finished) { testRestService(messageObj, null, null, finished); }, testRestService: function(messageObj, session, send, finished) { testRestService(messageObj, session, send, finished); } } }; Define a handler for the /api/proxy URL by defining a handler function named proxy
  • 39. Copyright © 2016 M/Gateway Developments Ltd Amend node_modules/restDemo.js var request = require('request'); function testRestService(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } module.exports = { restModule: true, handlers: { proxy: function(messageObj, finished) { testRestService(messageObj, null, null, finished); }, testRestService: function(messageObj, session, send, finished) { testRestService(messageObj, session, send, finished); } } }; The proxy function invokes the externalised original function which calls out to the jsonplaceholder service
  • 40. Copyright © 2016 M/Gateway Developments Ltd Amend node_modules/restDemo.js var request = require('request'); function testRestService(messageObj, session, send, finished) { var options = { url: 'https://jsonplaceholder.typicode.com/posts/1', method: 'GET', json: true }; request(options, function(error, response, body) { if (error) { finished({error: error}); } else { finished(body); } }); } module.exports = { restModule: true, handlers: { proxy: function(messageObj, finished) { testRestService(messageObj, null, null, finished); }, testRestService: function(messageObj, session, send, finished) { testRestService(messageObj, session, send, finished); } } }; Edit our original testRestService message handler to also call the now externalised function
  • 41. Copyright © 2016 M/Gateway Developments Ltd Edit your QEWD startup file var config = { managementPassword: 'keepThisSecret!', serverName: 'QEWD REST Server', port: 8080, poolSize: 2, database: { type: 'redis' } }; var routes = [ {path: '/api', module: 'restDemo'} ]; var qewd = require('qewd').master; qewd.start(config, routes); Add the route for the /api URL prefix We want it to use handler functions in our restDemo.js module
  • 42. Copyright © 2016 M/Gateway Developments Ltd Edit your QEWD startup file var config = { managementPassword: 'keepThisSecret!', serverName: 'QEWD REST Server', port: 8080, poolSize: 2, database: { type: 'redis' } }; var routes = [ {path: '/api', module: 'restDemo'} ]; var qewd = require('qewd').master; qewd.start(config, routes); Add routes to the QEWD start() function
  • 43. Copyright © 2016 M/Gateway Developments Ltd Restart QEWD • Try the original interactive application • It should still work
  • 44. Copyright © 2016 M/Gateway Developments Ltd Restart QEWD • Try the original interactive application • It should still work • Now try the REST proxy…
  • 45. Copyright © 2016 M/Gateway Developments Ltd Try the REST proxy It also works!