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
2
450
NTU CCSP 2012Fall - Node.js #2.1 - Simple File Host Service
node.js 0.8 + express 3
Steven Su
October 31, 2012
Tweet
Share
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
300
NTU CCSP 2012Fall - Facebook
xpsteven
1
210
NTU CCSP 2012Fall - Node.js #3 - Mongoose
xpsteven
2
730
NTU CCSP 2012Fall - Node.js #2 - express.js
xpsteven
3
570
Y! Open Hack 2012 Taiwan
xpsteven
0
180
NTU CCSP 2012Fall - Node.js #2 - Advanced Javascript and Node.js
xpsteven
1
550
Other Decks in Programming
See All in Programming
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
380
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
300
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
220
Claude Codeログ基盤の構築
giginet
PRO
7
2.5k
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
360
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
15
3k
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
240
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
420
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
140
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
240
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
110
文字コードの話
qnighy
44
17k
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
280
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
450
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
230
RailsConf 2023
tenderlove
30
1.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
480
Claude Code のすすめ
schroneko
67
220k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
82
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
940
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The agentic SEO stack - context over prompts
schlessera
0
690
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: 測試看看