Difference between revisions of "Node.js application as Windows service"
(.) |
(.) |
||
Line 17: | Line 17: | ||
<span style="font-size:larger;"><3> Copy following files to your application folder.</span> | <span style="font-size:larger;"><3> Copy following files to your application folder.</span> | ||
− | #<span style="font-size:larger;">https://github.com/ADVANTECH-Corp/APIGateway/blob/master/install_apigw.bat | + | #<span style="font-size:larger;">[https://github.com/ADVANTECH-Corp/APIGateway/blob/master/install_apigw.bat https://github.com/ADVANTECH-Corp/APIGateway/blob/master/install_apigw.bat]</span> |
− | #<span style="font-size:larger;">https://github.com/ADVANTECH-Corp/APIGateway/blob/master/uninstall_apigw.bat | + | #<span style="font-size:larger;">[https://github.com/ADVANTECH-Corp/APIGateway/blob/master/uninstall_apigw.bat https://github.com/ADVANTECH-Corp/APIGateway/blob/master/uninstall_apigw.bat]</span> |
− | #<span style="font-size:larger;">https://github.com/ADVANTECH-Corp/APIGateway/blob/master/install.js | + | #<span style="font-size:larger;">[https://github.com/ADVANTECH-Corp/APIGateway/blob/master/install.js https://github.com/ADVANTECH-Corp/APIGateway/blob/master/install.js]</span> |
− | #<span style="font-size:larger;">https://github.com/ADVANTECH-Corp/APIGateway/blob/master/uninstall.js</span> | + | #<span style="font-size:larger;">[https://github.com/ADVANTECH-Corp/APIGateway/blob/master/uninstall.js https://github.com/ADVANTECH-Corp/APIGateway/blob/master/uninstall.js]</span> |
== Modify files to apply your application == | == Modify files to apply your application == | ||
Line 38: | Line 38: | ||
<span style="font-size:larger;"><4> Add custom action in Advanced installer project.</span> | <span style="font-size:larger;"><4> Add custom action in Advanced installer project.</span> | ||
+ | |||
+ | <span style="font-size:larger;">Ref to [https://github.com/ADVANTECH-Corp/APIGateway/blob/master/installer/project/APIGateway.aip https://github.com/ADVANTECH-Corp/APIGateway/blob/master/installer/project/APIGateway.aip]</span> | ||
= Reference = | = Reference = |
Revision as of 04:21, 15 November 2018
Contents
Introduction
This guidelines is aim to teach you how to run your Node.js application as a Windows service.
APIGateway, created by EdgeSense Team, can be running as a Windows Service, so we take it for example in this guidelines.
APIGateway is available at https://github.com/ADVANTECH-Corp/APIGateway
How to
Copy files what we need
<1> Copy node.js executable into your application folder.
source can use https://github.com/ADVANTECH-Corp/APIGateway/blob/master/node.exe or other version node.js
<2> Copy node-windows into your node_modules folder.
Source can use https://github.com/ADVANTECH-Corp/APIGateway/tree/master/node_modules/node-windows
<3> Copy following files to your application folder.
- https://github.com/ADVANTECH-Corp/APIGateway/blob/master/install_apigw.bat
- https://github.com/ADVANTECH-Corp/APIGateway/blob/master/uninstall_apigw.bat
- https://github.com/ADVANTECH-Corp/APIGateway/blob/master/install.js
- https://github.com/ADVANTECH-Corp/APIGateway/blob/master/uninstall.js
Modify files to apply your application
<1> Modify install.js to change define.
name:'API-GW', description: 'API-GW', script: 'C:\\Program Files (x86)\\Advantech\\API-GW\\app.js',
<2> Modify uninstall.js to change define.
name:'API-GW', script: 'C:\\Program Files (x86)\\Advantech\\API-GW\\app.js'
<3> Modify uninstall_apigw.bat to remove meta files created by your application in the runtime.
<4> Add custom action in Advanced installer project.
Ref to https://github.com/ADVANTECH-Corp/APIGateway/blob/master/installer/project/APIGateway.aip