forked from Cliffbreak/tsviewer
removed viewer.js
This commit is contained in:
parent
204d005629
commit
efdb8a988b
2 changed files with 31 additions and 30 deletions
32
app.js
32
app.js
|
@ -7,7 +7,37 @@ app.engine('handlebars', exphbs({defaultLayout: 'main'}));
|
|||
app.set('view engine', 'handlebars');
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
res.render('home');
|
||||
res.render('home', {foo: 'bar'});
|
||||
});
|
||||
|
||||
app.listen(3000);
|
||||
|
||||
const TeamSpeak3 = require("ts3-nodejs-library")
|
||||
|
||||
var ts3conn = new TeamSpeak3({
|
||||
host: "localhost",
|
||||
queryport: 10011,
|
||||
serverport: 9987,
|
||||
username: "serveradmin",
|
||||
password: "R0cHL6tb",
|
||||
nickname: "NodeJS Query Framework",
|
||||
})
|
||||
|
||||
ts3conn.on("ready", () => {
|
||||
ts3conn.clientList({client_type:0}).then(clients => {
|
||||
clients.forEach(client => {
|
||||
console.log("Online: ", client.getCache().client_nickname)
|
||||
})
|
||||
}).catch(e => console.log("CATCHED", e.message))
|
||||
|
||||
ts3conn.channelList({}).then(channel => {
|
||||
channel.forEach(channel => {
|
||||
console.log("Channel: ", channel.getCache().channel_name)
|
||||
})
|
||||
}).catch(e => console.log("CATCHED", e.message))
|
||||
})
|
||||
|
||||
|
||||
|
||||
ts3conn.on("error", e => console.log("Error", e.message))
|
||||
ts3conn.on("close", e => console.log("Connection has been closed!", e))
|
||||
|
|
29
js/viewer.js
29
js/viewer.js
|
@ -1,29 +0,0 @@
|
|||
const TeamSpeak3 = require("ts3-nodejs-library")
|
||||
|
||||
var ts3conn = new TeamSpeak3({
|
||||
host: "localhost",
|
||||
queryport: 10011,
|
||||
serverport: 9987,
|
||||
username: "serveradmin",
|
||||
password: "R0cHL6tb",
|
||||
nickname: "NodeJS Query Framework",
|
||||
})
|
||||
|
||||
ts3conn.on("ready", () => {
|
||||
ts3conn.clientList({client_type:0}).then(clients => {
|
||||
clients.forEach(client => {
|
||||
console.log("Online: ", client.getCache().client_nickname)
|
||||
})
|
||||
}).catch(e => console.log("CATCHED", e.message))
|
||||
|
||||
ts3conn.channelList({}).then(channel => {
|
||||
channel.forEach(channel => {
|
||||
console.log("Channel: ", channel.getCache().channel_name)
|
||||
})
|
||||
}).catch(e => console.log("CATCHED", e.message))
|
||||
})
|
||||
|
||||
|
||||
|
||||
ts3conn.on("error", e => console.log("Error", e.message))
|
||||
ts3conn.on("close", e => console.log("Connection has been closed!", e))
|
Loading…
Reference in a new issue