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:\Users\admin\WebstormProjects\IPSO-demo\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\admin\WebstormProjects\IPSO-demo\package.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:\Users\admin\WebstormProjects\IPSO-demo>node express-demo.js
example app listening

result:

 

posted @ 2019-06-12 15:23  嵌入式实操  阅读(127)  评论(0编辑  收藏  举报