ResultĪnd we are able to start and stop the service. The name and the description can then be seen in the windows service tool. Listen for the 'install' event, which indicates the Var Service = require('node-windows').Service ĭescription: 'The websocket server for the APEX project.', The script name is the same script that would be called directly from node. In the node “shell” run the following commands. I did not encounter issues without the global flag. The author recommends to install it using the global flag -g. The command to install it is: npm install node-windows It is very lightweight and did not have dependencies to node-gyp which often gives trouble. The node package that I used is node-windows. The same logic can be applied for any node module, not just for websockets. Instead we would like to setup it as a windows service. All the output (console.log) will be written to the terminal.īut we don’t want to run it manually each time. To start the websocket server we would usually call node synwsserver.js The prerequisties are that you already need to have node installed on your machine. This post describes the steps how to setup such a service and also includes some monitoring information. One of the tasks was to setup this server as an service under a normal Windows Server 2003 (yes I know it is old) infrastructure. The websocket server is based upon node.js. In a recent project we are using websockets to respond in Apex to certain database events.
0 Comments
Leave a Reply. |