Code Monkey home page Code Monkey logo

nodetest's Introduction

1.0

(1) 建立在 JavaScript 之上

(2) 事件触发、异步的

(3) 专为数据密集型实时程序设计

问答

如何解释Node.js适合IO密集型不适合CPU密集型?

: CPU密集型:计算等逻辑判断的操作,如:压缩、解压、加密和解密等。I/O密集型:存取设备,网络设施的读取操作,如:文件的存取,http等网络操作,数据库操作等。Node.js 执行是单线程的,如果执行 CPU 密集的任务就会阻塞后续代码,且单线程无法充分利用 CPU 多核资源。而异步 I/O 是多线程的,在工作线程上执行,不会阻塞执行线程,执行效率更高。

Node 生成 https 秘钥、证书

秘钥:openssl genrsa 1024 > weichaozhan_priv.pem

证书:openssl req -x509 -new -key weichaozhan.pem > weichaozhan-cert.pem

RSA

RSA密钥对:openssl genrsa -aes256 -out rsa-key.pem 2048 导出原始的私钥:openssl rsa -in rsa-key.pem -outform PEM -out rsa-prv.pem

导出原始的公钥:openssl rsa -in rsa-key.pem -outform PEM -pubout -out rsa-pub.pem

nodetest's People

Contributors

weichaozhan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.