我正在使用{app}将使用的api
编写服务器ASP.NET Core
,
任务是提供半径为5 km
的所有人
我想使用npm包google-distance
,但是如何在我的cs文件中使用它
因为我只写了一个没有前端的api,
我想使用的代码是
var distance = require('google-distance');
distance.get(
{
origin: 'San Francisco, CA',
destination: 'San Diego, CA'
},
function(err, data) {
if (err) return console.log(err);
console.log(data);
});
根据google-distance npm的文档 我知道上面是节点代码
我如何在我的ASP.NET核心API
中使用它