welsonjs/helloworld.js

18 lines
403 B
JavaScript
Raw Normal View History

2023-12-11 07:54:21 +00:00
var SYS = require("lib/system");
var HTTP = require("lib/http");
2023-01-31 02:51:38 +00:00
function main(args) {
console.log("Hello world");
2023-12-11 07:10:55 +00:00
if (typeof WScript !== "undefined") {
2023-12-11 07:54:21 +00:00
console.log("Process version:", SYS.getProcessVersion());
}
try {
var web = HTTP.create();
console.log(web.userAgent);
} catch (e) {
console.error("Something wrong");
2023-12-11 07:10:55 +00:00
}
2023-01-31 02:51:38 +00:00
}
exports.main = main;