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
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
340
NTU CCSP 2012Fall - Facebook
xpsteven
1
220
NTU CCSP 2012Fall - Node.js #3 - Mongoose
xpsteven
2
750
NTU CCSP 2012Fall - Node.js #2 - express.js
xpsteven
3
590
Y! Open Hack 2012 Taiwan
xpsteven
0
220
NTU CCSP 2012Fall - Node.js #2 - Advanced Javascript and Node.js
xpsteven
1
560
Other Decks in Programming
See All in Programming
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
800
信頼性の目標を誰も求めてない
shubox
0
470
ALB ログから Trace を気合で繋げる技術
fohte
7
840
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
2
940
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
490
初めての模倣学習とVLA
natsutan
0
410
MySQLとPostgreSQLって何が違うの?
akagami
PRO
0
160
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
470
不幸な GC
chencmd
0
860
Deep dive into the select statement (GopherCon UK)
jespino
0
170
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.4k
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
Featured
See All Featured
Faster Mobile Websites
deanohume
310
32k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
180
Bash Introduction
62gerente
615
220k
The Curse of the Amulet
leimatthew05
2
14k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
510
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
320
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Docker and Python
trallard
47
4.2k
Code Reviewing Like a Champion
maltzj
528
40k
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: 測試看看