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
Laravel ビルトインサーバ.
Search
NishiuraYutaka
November 26, 2020
Business
510
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Laravel ビルトインサーバ.
NishiuraYutaka
November 26, 2020
Other Decks in Business
See All in Business
DNX Capital|Introduction Deck
natsumidnx
0
170
[AWS大喜利]こんなアーキテクチャは嫌だ ~コスト編~
kazuma777777
1
830
2026.10_中途採用資料.pdf
superstudio
PRO
5
120k
“隣のチームの改善の取り組み”を見える化 すれば、チームはもっと良くなると思っていた。同じ部署 19チーム・243件 の取り組みを見える化した記録と、見えてきた 壁と価値
hansodeeeeee
2
990
Corporate Story (GA technologies Co., Ltd.)
gatechnologies
0
1.3k
株式会社レボルト採用deck
takemura_yuto
0
560
Sasuke Financial Lab 会社概要
sasukefinanciallab
0
720
Podpora KOVY | 24. 9. 2026
ggfs
PRO
0
440
変化の時代に自分のハンドルを握る ── イチから始めるセルフマネジメント/Self-Management in the Winds of Change
ikuodanaka
2
300
KGモーターズ会社紹介資料_2026.10
kgmotors
0
32k
メディフォン株式会社 会社説明資料
mediphone
0
720
納品して終わり、を事業会社でやった話
tamosan01
2
210
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
The Limits of Empathy - UXLibs8
cassininazir
2
720
Six Lessons from altMBA
skipperchong
29
4.5k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
940
A better future with KSS
kneath
240
18k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Everyday Curiosity
cassininazir
0
360
Chasing Engaging Ingredients in Design
codingconduct
0
360
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
Transcript
©2020 RAKUS Co., Ltd. Laravel ビルトインサーバについて 2020/11/25 LT Y.Nishiura
自己紹介 ・奈良市在住(通勤中 鹿に出会います) ・チャットディーラー開発歴3年(管理と設計が主な作業) ・LT登壇 初。。。 2
唐突ですが 3
皆さん Laravel 開発で artisan serve 使ってますよね 4 php artisan serve
実はコレ 内部ではPHPのビルトインサーバ と言う機能を使ってます 5
ビルトインサーバとは PHPといっしょにインストールされるWebサーバ。 Apacheもいらない。Nginxもいらない。 6
ビルトインサーバとは 起動・利用がとても簡単 PHPでは これだけ。 7 php -S test.server:8000
ビルトインサーバとは 利用時はドキュメントルートを指定して起動 8 php -S test.server:8000 /tmp/sample.php PHP 7.3.20 Development
Server started at Wed Nov 18 10:35:59 2020 Listening on http://test.server:8000 Document root is /usr/local/sample Press Ctrl-C to quit.
こんなふうに使っています チャット設置先サイト(テスト用)の構築 9 php -S $(hostname):8000 /tmp/chat01-demo.html ・本番環境構築時の疎通確認 ・お客様のサイトで動作不正が有った時にサイトを複製して再現確認 ・HTMLいじりつつ動作不正の原因調査
etc
こんなふうに使っています ポート変えてバックグラウンドで動かせば複数起動も可能 10 php -S $(hostname): 8000 /tmp/chat01-demo.html & php
-S $(hostname): 8001 /tmp/chat02-demo.html &
Laravel ビルトインサーバ 使われていない人のため Laravelのビルトインサーバ起動方法記述 こっちのコマンドも簡単。これだけ。 11 php artisan serve
Laravel ビルトインサーバ ・引数でポート指定は可能 ・外部アクセスしたいならhostで0.0.0.0指定 ※デフォルトだと 127.0.0.1で起動するため 12 php artisan serve
--port=8000 --host 0.0.0.0
Laravel ビルトインサーバ 起動した (^^ 13
「お試しで Laravel 使ってみようかな」 と思ったときに便利! 14
こんなことに使えるビルトインサーバ ・お試しで手軽に動きを確かめたい ・簡易Webサーバとして静的ファイルを返す ・APIのダミー連携先としてモック的に使う 15
注意点 ・シングルスレッドプロセスしか実行しない ・Apache介さないので .htaccess 使えない 16
注意点 あとは当たり前ですが、本番利用しちゃだめ。 17 https://www.php.net/manual/ja/features.commandline.webserver.php
ビルトインサーバって便利だなぁ。 18
他の言語はどうか? PythonやRubyにも似たような機能はあるようです。 19 https://qiita.com/sudahiroshi/items/e74d61d939f18779970d python -m http.server 8000 ruby -rwebrick
-e 'WEBrick::HTTPServer.new(:DocumentRoot => "./", :Port => 8000).start'
他の言語はどうか? PHPが一番シンプル! Larverlはちょっと複雑かも。。。でもまあ、シンプル 20 php -S test.server:8000 php artisan serve
--port=8000 --host 0.0.0.0
ぜひビルトインサーバ 活用してみませんか? 21
ご清聴ありがとうござました。 22