2.1.13 • Published 7 years ago

izy-server v2.1.13

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

izy-server

Node.js server side components for interoperability with the Izy platform.

INSTALLATION

If you are using npm (the Node.js package manager) always ensure that your npm is up-to-date by running:

npm update -g npm

Then use:

npm install izy-server

USING THE TOOL

In your node server, you can intercept any url and redirect it to the izy-server by:

return require('izy-server')({

/* config object for customizing the izy access */

}).handleRequest(request, response);    

For example, the following will create a very simple end point on https://localhost:3000/. It is worth mentionin that the ui/node/direct will convert http urls to https when called from https context, so it is important that your local server support https. Here is an example https server:

Generate the private key and certificate by:

openssl genrsa 1024 > key.pem
openssl req -x509 -new -key key.pem > key-cert.pem

Then run the server:

const port = 3000;
const https = require('https');
const fs = require('fs');

 var options = {
 key: fs.readFileSync('key.pem'),
 cert: fs.readFileSync('key-cert.pem')
 };

const requestHandler = (request, response) => {
   console.log('requestHandler', request.url);
   return require('izy-server')({}).handleRequest(request, response);
}

https.createServer(options, requestHandler).listen(port);
console.log('Listening on port: ', port);

Hitting https://localhost:3000/ will display the following message:

izyserver running. Please define processReq function to customize the behavior.

NOTE

for more details, visit https://izyware.com

2.1.13

7 years ago

2.1.12

7 years ago

2.1.11

7 years ago

2.1.10

8 years ago

2.1.9

8 years ago

2.1.7

8 years ago

2.1.6

8 years ago

2.1.5

8 years ago

2.1.4

8 years ago

2.1.3

8 years ago

2.1.2

8 years ago