const Request = require('request-promise');
const OSMToGeoJSON = require('osmtogeojson');
const DOMParser = require('xmldom').DOMParser;
const Log = console.log;
Request({
method: 'GET',
uri: 'https://api.openstreetmap.org/api/0.6/map?bbox=53.97501,57.05107,53.97616,57.05166',
encoding: 'utf8'
}).then(function (xml_osm) {
var xml_parser = new DOMParser();
var xml = xml_parser.parseFromString(xml_osm);
var geojson = OSMToGeoJSON(xml);
var json_geojson = JSON.stringify(geojson);
Log(json_geojson);
}).catch(function (err) {
Log(err);
});