learning express step(一)

first : create new project  

then install express package : 

npm install express --save
npm WARN saveError ENOENT: no such file or directory, open 'C:UsersadminWebstormProjectsIPSO-demopackage.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:UsersadminWebstormProjectsIPSO-demopackage.json'
npm WARN IPSO-demo No description

const express  = require('express');
const app = express();
app.get('/',function (req,res) {
    res.send("hello world");
});

app.listen(3000, function () {
    console.log("example app listening");
});

running:

C:UsersadminWebstormProjectsIPSO-demo>node express-demo.js
example app listening

result:

原文地址:https://www.cnblogs.com/lianghong881018/p/11009905.html