如何在ASP.NET Core

时间:2017-08-29 07:31:03

标签: npm asp.net-core packages

我正在使用{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

中使用它

0 个答案:

没有答案