mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
18 lines
319 B
JavaScript
18 lines
319 B
JavaScript
var Gamedig = require('gamedig');
|
|
var ip = require('ip');
|
|
|
|
exports.index = function (req, res){
|
|
Gamedig.query({
|
|
type: 'arma3',
|
|
host: ip.address()
|
|
},
|
|
function(state) {
|
|
if(state.error) {
|
|
res.send({error: state.error});
|
|
} else {
|
|
res.send(state.raw);
|
|
}
|
|
}
|
|
);
|
|
};
|