我在 Windows 的命令提示符下运行了一个 Node.js。现在我喜欢做的是以某种方式在网页上将控制台信息作为 html 回显。我该如何管理?如果是这样,我如何传递参数?
谢谢,如果我有错误的想法,请纠正我..
编辑:
这就是我生成输出的方式:
// Generated by CoffeeScript 1.6.2
(function() {
var LolClient, client, options, summoner, util;
LolClient = require('./lol-client');
util = require('util');
options = {
region: '',
username: '',
password: '',
version: '3.6.16_05_29_18_19'
};
summoner = {
name: 'HotshotGG',
acctId: 434582,
summonerId: 407750,
teamId: "TEAM-a1ebba15-986f-488a-ae2f-e081b2886ba4"
};
client = new LolClient(options);
client.on('connection', function() {
console.log('Connected');
client.getSummonerByName(summoner.name, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
client.getSummonerStats(summoner.acctId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
client.getMatchHistory(summoner.acctId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
client.getAggregatedStats(summoner.acctId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
client.getTeamsForSummoner(summoner.summonerId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
client.getTeamById(summoner.teamId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
return client.getSummonerData(summoner.acctId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
});
client.connect();
}).call(this);