node.js npm 安装 https
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12028046/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
npm install https
提问by prototype
Hopefully a simple question,
npm install httpworks fine and I can connect via port 80 to third party services.
npm install httpsby contrast does not latch on to a recognized package
希望一个简单的问题,
npm install http工作正常,我可以通过端口 80 连接到第三方服务。
npm install https相比之下,不会锁定已识别的包裹
Though I see a reference to package https here:
虽然我在这里看到对包 https 的引用:
HTTP GET Request in Node.js Express
Node.js Express 中的 HTTP GET 请求
What's the httpsanalog to package httpin node.js / Express?
在 node.js / Express 中https打包的模拟是什么http?
回答by 3on
So Node itself has both modules to create a http server and an https server:
所以 Node 本身有两个模块来创建一个 http 服务器和一个 https 服务器:
Meaning you don't need NPM to get those working, they exist even before NPM itself.
这意味着你不需要 NPM 来让它们工作,它们甚至在 NPM 本身之前就已经存在。
On the other hand NPM will give you access to those great modules/framework.
另一方面,NPM 会让你访问那些伟大的模块/框架。
Expressis a framework based on connectblabla... it is awesome to make API or Website as long as you are not looking for a full coffee maker framework. There are a few built on top of Express like railways.js
Express是一个基于connectblabla的框架……只要您不寻找完整的咖啡机框架,制作 API 或网站就很棒。有一些构建在 Express 之上,例如rails.js
Requestto make HTTP ou HTTPS queries. Request is awesome, it keeps getting better and is today by far the best tool to grab any web content from a node app. If what you are looking for is to do a scraper you may want to look at cheerio.
请求进行 HTTP 或 HTTPS 查询。Request 很棒,它一直在变得更好,并且是迄今为止从 node 应用程序中获取任何 Web 内容的最佳工具。如果你正在寻找的是做一个刮刀,你可能想看看cheerio。
PS: I took the time to give a good answer. But you should know that the best quality of a developer is to be able to read the docs rather than cry from help without even looking at the doc. My two cents.
PS:我花时间给出了一个很好的答案。但是您应该知道,开发人员的最佳品质是能够阅读文档,而不是不看文档就寻求帮助。我的两分钱。

