Git Product home page Git Product logo

express's Introduction

express

  • 初始化專案
    express -f 專案名稱
  • install package
    #兩者擇一執行
    yarn install
    npm install
    初始後, 使用npm installyarn install安裝 package.json 內所指定的套件, 安裝後會產生 node_modules 資料夾
  • routes/index.js 加入 /test 路徑, 並傳送文字
    router.get 代表建立一個路由並使用 HTTP request methods 中的 get 形式.
    router.get('子路徑', function(接收資料, 回傳資料, next) {
        res.send('顯示的文字')
    })
  • 執行
    使用 node ./bin/wwwnpm start 來啟動專案(localhost:3000)
    npm start 是在 package.json 檔案裡的 script 所設定的快捷鍵
    #兩者擇一執行
    node ./bin/www
    npm start

express's People

Contributors

crispiace avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.