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
第五回後期ネットワークチーム講座
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
北海道科学大学 電子計算機研究部
November 21, 2016
Education
97
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
第五回後期ネットワークチーム講座
北海道科学大学 電子計算機研究部
November 21, 2016
More Decks by 北海道科学大学 電子計算機研究部
See All by 北海道科学大学 電子計算機研究部
第12回Network講座2019
densan
1
69
第11回Network講座2019
densan
0
86
第10回Network講座2019
densan
0
64
第09回Network講座2019
densan
1
180
第08回Network講座2019
densan
0
59
第07回Network講座2019
densan
0
61
第06回Network講座2019
densan
0
84
第05回Network講座2019
densan
0
61
第04回Network講座2019
densan
0
130
Other Decks in Education
See All in Education
響け!ユーフォニアムと考える「決め方」/Thinking About Decision-Making with Sound! Euphonium
3l4l5
1
200
BRIEF OUTLINE OF IMPORTANT PLANT CONSTITUENTS
pawan_pharm
0
210
Railsチュートリアル × 反転学習の事例紹介
yasslab
PRO
3
190k
SANG PENCIPTA BERBICARA (01ABSG-Q4-2026)
ssmedikasda
0
470
Sekolah Sabat - Triwulan 3 2026 - Pelajaran 12
hiola
0
12k
Science Tokyo University for International Research Excellence scheme_April 2026
sciencetokyo
PRO
0
520
人間関係に取り組む、その時に / step away to make space
spring_aki
0
140
形骸化しない社内勉強会の取り組み - オーナーシップの作り方 / In-house study session
soudai
PRO
1
430
The Dirty Dozen: 12 gala mistakes you don’t know you’re making
auctria
PRO
0
140
25-26 CBT Library top items
cbtlibrary
0
360
ちいかわを読め
uchi8977
1
410
[2026後期火5] 論理学(京都大学文学部 後期 第2回)「量化子の導入」
yatabe
0
180
Featured
See All Featured
Between Models and Reality
mayunak
4
500
4 Signs Your Business is Dying
shpigford
187
23k
Prompt Engineering for Job Search
mfonobong
0
520
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
600
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
270
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Transcript
ネットワークチーム 後期第五回講座資料 アプリケーション作成
目次 • アプリケーション作成 • 用語解説
準備 1. 作業用フォルダでコマンドプロンプトを開く 2. npm init を実行 (その後は特にこだわりがなければ全てEnterでよい)
package.json • npm init を実行すると package.json が作られる • JSONは、JavaScript のオブジェクトと同様の記法で書か
れたテキストファイル プログラムにデータを渡す際などに使用される
package.json の中身 → 入っていないモジュールがある 場合、以下を実行 npm install --save モジュール名
package.json • 内容を見ると、現在インストールしているモジュールが “dependencies :” に書き込まれている 新たにモジュールを追加する場合、インストール時に ”--save” オプションを使用する •
npm update で一括アップデート、npm start で実行 etc…
Pug(旧Jade)の記法 ①基本的にタグ名のみ記述 (<>いらず、閉じタグもなし) ② インデントを用いて階層構造を表現する ③タグ名の後に( )を付けて属性の指定ができる
Pug(Jade)の記法 ④ 簡単な制御構文(While, If など)や変数、JSコードが利用で きる JSのコードは先頭に” – “(ハイフン)を付けて記述する ⑤
変数を呼び出す場合、 #{変数名} または =変数名 と記述 ⑥ コマンドを用いることでテンプレートの継承ができる
• app.js を次の2ページの通り記述 一つのjsファイルに続けて書く (全28行)
None
None
• 次に、app.js があるフォルダ内に 「views」 というフォルダを作成 (ついでに 「public」 というフォルダも作成)
Pugファイル作成 • views/index.pug (全4行)
Pugファイル作成 • views/layout.pug (全10行)
CSS作成 • public/css/style.css
レンダリング • テンプレートエンジンからHTMLを生成すること • render関数でこれが行われている
レンダリング • render関数から渡された値はpugファイルで指定された場所に 代入される
ルーティング • リクエストされたURLに対して呼び出すアクションを変更する仕組 Localhost:3000/ にアクセスした場合 ↓ Localhost:3000/hello/ にアクセスした場合 ↓