node.js - express hosting static directory problem
迷茫
迷茫 2017-05-16 13:38:56
0
1
492

I see many abbreviations:

let app = require('express')();

Then I want to use app.use(express.static('public'));What should I do with this kind of thing?
Must be written separately:

let express = require('express');
let app = express();

Is it true that we can’t be lazy in this kind of situation?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
左手右手慢动作

It should always be written like this, concise and clear

let express = require('express');
let app = express();
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template