Can't run this nodejs code?

后端 未结 2 1155
感情败类
感情败类 2021-01-14 05:47

Im trying to run this simple code but I m getting error all the time...I really dont know what\'s the problem. It seems to me very Ok...? Thanks!

    var htt         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-14 06:07

    In my case, I had

    var http = require('http');
    var path= require('path');
    

    As soon as I deleted the the http line, it worked for me.So, i did leave only

    var path= require('path');

    I was working on express,mongodb,socket.io.

提交回复
热议问题