Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
NTU CCSP 2012Fall - Node.js #2.1 - Simple File ...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Steven Su
October 31, 2012
Programming
460
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
NTU CCSP 2012Fall - Node.js #2.1 - Simple File Host Service
node.js 0.8 + express 3
Steven Su
October 31, 2012
More Decks by Steven Su
See All by Steven Su
JSDC.TW 2013 Node.js佈署心得
xpsteven
14
1.2k
NTU CCSP 2012Fall - Mobile Web入門 回首網頁開發
xpsteven
3
330
NTU CCSP 2012Fall - Facebook
xpsteven
1
220
NTU CCSP 2012Fall - Node.js #3 - Mongoose
xpsteven
2
740
NTU CCSP 2012Fall - Node.js #2 - express.js
xpsteven
3
580
Y! Open Hack 2012 Taiwan
xpsteven
0
210
NTU CCSP 2012Fall - Node.js #2 - Advanced Javascript and Node.js
xpsteven
1
560
Other Decks in Programming
See All in Programming
えっ!!コードを読まずに開発を!?
hananouchi
0
170
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
480
AIエージェントで 変わるAndroid開発環境
takahirom
2
480
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
220
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
210
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
8.8k
どこまでゆるくて許されるのか
tk3fftk
0
460
symfony/aiとlaravel/boost
77web
0
120
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
100
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.4k
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Exploring anti-patterns in Rails
aemeredith
3
440
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
The Pragmatic Product Professional
lauravandoore
37
7.4k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
260
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
370
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.1k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
230
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
350
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Transcript
簡易檔案上傳網站
目標 • 可以上傳檔案並給名稱 • 可以清單顯示已經上傳的檔案 • 可以顯示已經上傳的檔案
環境 • Windows 7 • Sublime Text 2 • Node.js
0.8.x • Express.js 3.0
要求 • 安裝好node 0.8.x • 可以使用npm指令 • 可以使用node指令
Step 0: 安裝express 打開終端機 輸入 npm install express –g -g也可以放install前面
-g代表安裝到global 才可以在任何資料夾當作指 令來使用 簡單說就是安裝程式到系統
Step 0: 安裝express
Step 1: 建立專案 測試express指令
Step 1: 建立專案 express -e -c less -s uploadserver
Step 2: 安裝所需要的庫 npm install 會自動依照目錄下 的package.json安裝所依賴的 套件到目前目錄(local mode)
Step 3: 驗證安裝 node app.js 打開瀏覽器 http://localhost:3000/
Step 4: 打開ST2 以資料夾模式開啟
Step 5: 編輯bodyParser 修改bodyParser keepExtensions => 保留附檔名 uploadDir => 指定上傳到哪個資料夾
Step 6: 接受上傳 var database 模擬一個資料庫 res.redirect(路徑) 回傳302導向其他 網頁
Step 7: 修改index view
Step 8: 測試看看吧
Step 9: 修改index的handler
Step 10: 再修改index.ejs
Step 11: 測試看看