mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 07:21:43 +00:00
Update WelsonJS.Service and related files
This commit is contained in:
parent
7ef118955d
commit
f60f99fc73
|
@ -92,7 +92,7 @@ namespace WelsonJS.Service
|
|||
// set script name
|
||||
if (string.IsNullOrEmpty(scriptName))
|
||||
{
|
||||
scriptName = "helloworld";
|
||||
scriptName = "defaultService";
|
||||
Log("Script name not provided. Using default value: " + scriptName);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
@echo off
|
||||
rem bootstrap.bat
|
||||
rem WelsonJS 0.2.7
|
||||
rem https://github.com/gnh1201/welsonjs
|
||||
|
||||
pushd %~dp0
|
||||
|
@ -20,6 +22,9 @@ echo [*] Registering WelsonJS Toolkit component...
|
|||
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase bin\x86\WelsonJS.Toolkit.dll
|
||||
%WINDIR%\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase bin\x64\WelsonJS.Toolkit.dll
|
||||
|
||||
rem echo [*] Registering WelsonJS Service component...
|
||||
rem %WINDIR%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe bin\x86\WelsonJS.Service.exe
|
||||
|
||||
echo [*] Done.
|
||||
|
||||
cscript app.js bootstrap
|
||||
|
|
20
defaultService.js
Normal file
20
defaultService.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
function main(args) {
|
||||
console.log("WelsonJS.Service required.");
|
||||
}
|
||||
|
||||
function onServiceStart() {
|
||||
return "onServiceStart recevied";
|
||||
}
|
||||
|
||||
function onServiceStop() {
|
||||
return "onServiceStop recevied";
|
||||
}
|
||||
|
||||
function onServiceElapsedTime() {
|
||||
return "onServiceElapsedTime recevied";
|
||||
}
|
||||
|
||||
exports.main = main;
|
||||
exports.onServiceStart = onServiceStart;
|
||||
exports.onServiceStop = onServiceStop;
|
||||
exports.onServiceElapsedTime = onServiceElapsedTime;
|
|
@ -18,19 +18,4 @@ function main(args) {
|
|||
//Toolkit.create();
|
||||
}
|
||||
|
||||
function onServiceStart() {
|
||||
return "onServiceStart recevied";
|
||||
}
|
||||
|
||||
function onServiceStop() {
|
||||
return "onServiceStop recevied";
|
||||
}
|
||||
|
||||
function onServiceElapsedTime() {
|
||||
return "onServiceElapsedTime recevied";
|
||||
}
|
||||
|
||||
exports.main = main;
|
||||
exports.onServiceStart = onServiceStart;
|
||||
exports.onServiceStop = onServiceStop;
|
||||
exports.onServiceElapsedTime = onServiceElapsedTime;
|
||||
|
|
Loading…
Reference in New Issue
Block a user