Nodejs / Express - Launching my app: express.createServer() is deprecated

前端 未结 5 1079
北荒
北荒 2020-12-05 02:55

I downloaded a node app to test and play around with. I have googled around and found that Express is found to be a little outdated. Can someone help me to fix the implement

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 03:36

    Another potential solution to this is to install express 2.5.8 as a dependency.

    Add to package.json:

        {
        "name": "authentication"
      , "version": "0.0.1"
      , "private": true
      , "dependencies": {
          "express": "2.5.8"
        , "jade": ">= 0.26.1"
      }
    }
    

    and then run

    npm install
    

提交回复
热议问题