You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
448 B

"use strict";
7 years ago
const axios = require('axios');
const geotransIP = process.env.GEOTRANS_IP;
function geotrans(coord) {
let result;
7 years ago
return axios.get(`http://${geotransIP}:3150`, {
params:{
'datum':'WGE',
'coord':coord
}
})
.then(function (response){
return response.data;
}).catch(function (reason){
return reason;
});
}
7 years ago
module.exports = {
geotrans: geotrans
};