2.1.13 • Published 9 years ago

izy-server v2.1.13

Weekly downloads
1
License
ISC
Repository
github
Last release
9 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

9 years ago

2.1.12

9 years ago

2.1.11

9 years ago

2.1.10

10 years ago

2.1.9

10 years ago

2.1.7

10 years ago

2.1.6

10 years ago

2.1.5

10 years ago

2.1.4

10 years ago

2.1.3

10 years ago

2.1.2

10 years ago