Я пытаюсь выучить промежуточное программное обеспечение в Express JS.Может ли кто-нибудь помочь, где я скучаю?Вот мой код
var express = require('express');
var bodyParser = require('body-parser');
var path = require('path');
var app = express();
app.use("/", function(req, res, next){
console.log("this is my second output");
next();
});
app.get('/', function(req,res){
console.log("this is my first output");
//res.send('Hello World');
});
app.listen(3000, function(){
console.log('Server started on port 3000...');
})
Я получаю Server started on port 3000..
, когда я запускаю на cmd и получаю "страница не работает" на localhost:3000
Отредактировано
Iполучил
Server started on port 3000...
this is my second output
this is my first output
this is my second output
this is my first output
this is my second output
this is my first output
this is my second output
this is my first output
this is my second output
this is my first output
this is my second output
this is my first output
this is my second output
this is my first output
через некоторое время.Но localhost: 3000 все еще не работает