-
Notifications
You must be signed in to change notification settings - Fork 79
Deploying Ogre on Windows Server
Ben Fousek edited this page Nov 4, 2015
·
2 revisions
An Ogre deployment strategy on Windows Server as a service. This has been successful on Windows Server 2012 R2.
Install prerequisites:
- Install Node.
- Install the core GDAL libraries http://www.gisinternals.com/query.html?content=filelist&file=release-1600-x64-gdal-1-11-1-mapserver-6-4-1.zip.
- Add GDAL directory to PATH environmental variable.
Install ogre and node-windows:
- Create directory
C:\ogre
and open Powershell in said directory. npm install ogre
npm install -g node-windows
npm link node-windows
Create install/uninstall scripts in C:\ogre
:
install.js
var Service = require('node-windows').Service;
var svc = new Service({
name:'Ogre Web Client',
description: 'Local Ogre Web Client',
script: 'C:\\ogre\\node_modules\\ogre\\bin\\ogre.js'
});
svc.on('install', function(){
svc.start();
});
svc.install();
uninstall.js
var Service = require('node-windows').Service;
var svc = new Service({
name:'Ogre Web Client',
script: 'C:\\ogre\\node_modules\\ogre\\bin\\ogre.js'
});
svc.on('uninstall', function(){
console.log('Uninstall complete.');
console.log('The service exists: ',svc.exists);
});
svc.uninstall();
Run and test:
- In
C:\ogre
runnode install.js
. - Open
http://localhost:3000
orhttp://SEVER_NAME:3000
in a browser.
Optionally use IIS URL Rewrite to reverse-proxy to an IIS web site URL. If the UI is not needed the convert
and convertJson
endpoints can each have an independent rewrite rule.