zoukankan      html  css  js  c++  java
  • nodejs express project

    user root

    1. install express
      npm install express -g

    2. install express...
      npm install express-generator -g

    3. Create express project
      express <project_name>

    4. Enter project files and install dependency
      cd <project_name>
      npm install
      Maybe the dependency is not all round. So you need install the others yourself.
      But if there is a warning as
      npm WARN deprecated jade@0.26.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
      Just ignore it.

    5. start peoject
      express start

    6. done
      terminal viewer:

    > myweb@0.0.0 start /home/pualus/Documents/web/node/myweb
    > node ./bin/www
    GET / 200 315.817 ms - 170
    GET /stylesheets/style.css 200 6.160 ms - 111
    GET /favicon.ico 404 35.503 ms - 1185
    GET /favicon.ico 404 34.215 ms - 1185
    

    Open the firefox then input site:localhost:3000/
    OK!!!

  • 相关阅读:
    十一作业
    11.20
    11.13 第十二次、
    11.13 第十一次、
    11.06第十次、
    11.06第九次、
    10.30
    10.23
    10.16
    10.9
  • 原文地址:https://www.cnblogs.com/pualus/p/6859886.html
Copyright © 2011-2022 走看看