What is Express.js?

后端 未结 8 2075
北荒
北荒 2020-12-02 03:42

I am a learner in Node.js.

  1. What\'s Express.js?
  2. What\'s the purpose of it with Node.js?
  3. Why do we actually need Express.js? How is it useful fo
8条回答
  •  -上瘾入骨i
    2020-12-02 04:00

    1. What is Express.js?

    Express.js is a Node.js web application server framework, designed for building single-page, multi-page, and hybrid web applications. It is the de facto standard server framework for node.js.

    Frameworks built on Express.

    Several popular Node.js frameworks are built on Express:

    LoopBack: Highly-extensible, open-source Node.js framework for quickly creating dynamic end-to-end REST APIs.

    Sails: MVC framework for Node.js for building practical, production-ready apps.

    Kraken: Secure and scalable layer that extends Express by providing structure and convention.

    MEAN: Opinionated fullstack JavaScript framework that simplifies and accelerates web application development.

    1. What is the purpose of it with Node.js?
    2. Why do we actually need Express.js? How it is useful for us to use with Node.js?

    Express adds dead simple routing and support for Connect middleware, allowing many extensions and useful features.

    For example,

    • Want sessions? It's there
    • Want POST body / query string parsing? It's there
    • Want easy templating through jade, mustache, ejs, etc? It's there
    • Want graceful error handling that won't cause the entire server to crash?

提交回复
热议问题