Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
NTU CCSP 2012Fall - Node.js #2.1 - Simple File ...
Search
Steven Su
October 31, 2012
Programming
470
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.3k
NTU CCSP 2012Fall - Mobile Web入門 回首網頁開發
xpsteven
3
360
NTU CCSP 2012Fall - Facebook
xpsteven
1
220
NTU CCSP 2012Fall - Node.js #3 - Mongoose
xpsteven
2
770
NTU CCSP 2012Fall - Node.js #2 - express.js
xpsteven
3
590
Y! Open Hack 2012 Taiwan
xpsteven
0
250
NTU CCSP 2012Fall - Node.js #2 - Advanced Javascript and Node.js
xpsteven
1
560
Other Decks in Programming
See All in Programming
Rでドレミ/Do-Re-Mi_with_R
florets1
0
110
APNsからLive Activityを開始する話
yumnumm
0
150
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
33
15k
Webの地図
yosuke_furukawa
PRO
6
5k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.4k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
160
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.4k
速習iPhone Duo対応
yuukiw00w
2
940
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
700
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
230
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
380
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
How GitHub (no longer) Works
holman
316
150k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
510
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Navigating Weather and Climate Data
rabernat
0
540
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
A designer walks into a library…
pauljervisheath
211
25k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
600
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: 測試看看