Dpack get data Node : V10
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 

36 рядки
973 B

  1. var Service = require('node-windows').Service;
  2. // Create a new service object
  3. var svc = new Service({
  4. name:'DPACKGetData',
  5. description: 'This application will fetch data from DPACK database and send it Primary Database',
  6. script: require('path').join(__dirname, 'server.js'),
  7. nodeOptions: [
  8. '--harmony',
  9. '--max_old_space_size=4096'
  10. ],
  11. env:{
  12. name: "NODE_ENV",
  13. value: "production"
  14. }
  15. });
  16. // Listen for the "install" event, which indicates the
  17. // process is available as a service.
  18. svc.on('install',function(){
  19. svc.start();
  20. });
  21. // Just in case this file is run twice.
  22. //svc.on('alreadyinstalled',function(){
  23. // console.log('This service is already installed.');
  24. //});
  25. // Listen for the "start" event and let us know when the
  26. // process has actually started working.
  27. //svc.on('start',function(){
  28. // console.log(svc.name+' started!\nVisit http://127.0.0.1:3000 to see it in action.');
  29. //});
  30. // Install the script as a service.
  31. svc.install();