node | node 윈도우 10 서비스 등록 & 삭제
페이지 정보
작성자 굿스웹 작성일20-01-06 16:53 조회1,207회 댓글0건첨부파일
- 데몬_서비스.zip (287.8K) 0회 다운로드 DATE : 2020-02-25 15:00:44
관련링크
본문
윈도우 10 서비스 등록하기
/*
npm install node-windows 모듈설치
node Service_install.js : 서비스 등록
node Service_uninstall.js : 서비스 삭제
*/
[Service_install.js]
var Service = require('node-windows').Service;
var svc = new Service({
name:'auto_node',
description: 'auto node file js ',
script: __dirname+'/autotime_push.js', //node 실행파일 지정
nodeOptions: [
'--harmony',
'--max_old_space_size=4096'
]
});
svc.on('install',function(){
svc.start();
});
svc.install();
[Service_uninstall.js]
var Service = require('node-windows').Service;
// Create a new service object
var svc = new Service({
name:'auto_node',
description: 'The nodejs.org example web server.',
script: __dirname+'/ServerIndex.js',
});
svc.on('uninstall',function(){
console.log('Uninstall complete.');
console.log('The service exists: ',svc.exists);
});
svc.uninstall();
/*
npm install node-windows 모듈설치
node Service_install.js : 서비스 등록
node Service_uninstall.js : 서비스 삭제
*/
[Service_install.js]
var Service = require('node-windows').Service;
var svc = new Service({
name:'auto_node',
description: 'auto node file js ',
script: __dirname+'/autotime_push.js', //node 실행파일 지정
nodeOptions: [
'--harmony',
'--max_old_space_size=4096'
]
});
svc.on('install',function(){
svc.start();
});
svc.install();
[Service_uninstall.js]
var Service = require('node-windows').Service;
// Create a new service object
var svc = new Service({
name:'auto_node',
description: 'The nodejs.org example web server.',
script: __dirname+'/ServerIndex.js',
});
svc.on('uninstall',function(){
console.log('Uninstall complete.');
console.log('The service exists: ',svc.exists);
});
svc.uninstall();
[주소복사] https://www.goodsweb.kr/?u=D41XM64r
SNS 알리기
핀터레스트
텔레그램로
블로그로
페이스북
트위터
카카오스토리
카톡 공유
관련 블로그
로딩중