- 初始化專案
express -f 專案名稱
- install package
初始後, 使用
#兩者擇一執行 yarn install npm install
npm install
或yarn install
安裝 package.json 內所指定的套件, 安裝後會產生 node_modules 資料夾 - routes/index.js 加入 /test 路徑, 並傳送文字
router.get
代表建立一個路由並使用 HTTP request methods 中的 get 形式.router.get('子路徑', function(接收資料, 回傳資料, next) { res.send('顯示的文字') })
- 執行
使用node ./bin/www
或npm start
來啟動專案(localhost:3000)
npm start
是在 package.json 檔案裡的 script 所設定的快捷鍵#兩者擇一執行 node ./bin/www npm start
express's Introduction
express's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.