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

前端 未结 5 1076
北荒
北荒 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:40

    Its can done with this simple program:

    var express = require('express');
    var app = express();
    app.get('/',
        function(req,res)
        {
            res.send("express");
        }
    );
    app.listen(3333);
    

    it works fine.

提交回复
热议问题