You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ mkdir express-quick-start
$ cd express-quick-start
# init project name foo
$ npx express-generator@4 foo
---
npx: 10 安裝成功,花費 2.298 秒
warning: the default view engine will not be jade in future releases
warning: use `--view=jade' or `--help'for additional options create : foo/ create : foo/public/ create : foo/public/javascripts/ create : foo/public/images/ create : foo/public/stylesheets/ create : foo/public/stylesheets/style.css create : foo/routes/ create : foo/routes/index.js create : foo/routes/users.js create : foo/views/ create : foo/views/error.jade create : foo/views/index.jade create : foo/views/layout.jade create : foo/app.js create : foo/package.json create : foo/bin/ create : foo/bin/www change directory: $ cd foo install dependencies: $ npm install run the app: $ DEBUG=foo:* npm start
Install npm package we need (already init package.json for us).
$ cd foo/
$ npm install
---
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Please update to at least constantinople 3.1.1
npm WARN deprecated [email protected]: Deprecated, use jstransformer
npm notice created a lockfile as package-lock.json. You should commit this file.
added 100 packages from 139 contributors and audited 101 packages in 3.481s
found 4 vulnerabilities (3 low, 1 critical)
run `npm audit fix` to fix them, or `npm audit`for details
Quick Start Server
$ DEBUG=foo:* npm start
>[email protected] start /private/tmp/express-quick-start/foo
> node ./bin/www
foo:server Listening on port 3000 +0ms
GET /FG_Virgil.woff2 404 273.805 ms - 1182
GET /Cascadia.woff2 404 19.512 ms - 1182
GET /fonts.css 404 34.969 ms - 1182
GET /service-worker.js 404 12.145 ms - 1182
GET /manifest.json 404 6.847 ms - 1182
GET /favicon.ico 404 7.803 ms - 1182
GET /manifest.json 404 8.249 ms - 1182
GET / 200 6.232 ms - 170
GET /stylesheets/style.css 200 9.776 ms - 111
GET /stylesheets/style.css 304 0.744 ms - -
GET / 304 11.890 ms - -
GET /stylesheets/style.css 304 1.397 ms - -
source repo https://github.com/expressjs/express