Upgrade to Pro — share decks privately, control downloads, hide ads and more …

天下一 Dev Server 武道会 / World Dev Server Tournament

60775fff9467dfa6fa158228010a26df?s=47 Pちゃん
November 22, 2018

天下一 Dev Server 武道会 / World Dev Server Tournament

60775fff9467dfa6fa158228010a26df?s=128

Pちゃん

November 22, 2018
Tweet

Transcript

  1. גࣜձࣾσΟʔɾΤψɾΤʔ ౻ݪ৻ଠ࿠BLB1$IBO ఱԼҰdev server෢ಓձ Frontend de KANPAI! #5

  2. ͜Μʹͪ͸

  3. PͪΌΜͰ͢ @p1ch_jp

  4. ීஈ͸ɺ6*σβΠφʔΛ΍͍ͬͯ·͢ɻ MyAnimeListͱ͔ɺϋοΧυʔϧͱ͔

  5. ࣗݾ঺հ͸·͍͍͋΍

  6. ࠓ೥͓ੈ࿩ʹͳͬͨ΋ͷͰ͢Ͷʂ

  7. ࠓ೥ͱ͘ʹ͓ੈ࿩ʹͳͬͨ΋ͷ w 4LFUDI w 6*ͭ͘Δͷ͸ίϨ͕ϝΠϯ w "CTUSBDU w ΋͏ʮ࠷৽൛DPQZ@OFXʯΈ͍ͨͳ࣌୅͸ऴΘΓ w

    /PXTI w ແྉͰ্ཱ͕ͪͬͯɺ84௨Δͷ͸وॏͩ w /VYUKT w ࣗ෼͸੩తαΠτΛHFOFSBUFίϚϯυͰͭ͘ΔΈ͍ͨ ͳ࢖༻ํ๏͕ଟ͔ͬͨ
  8. ͜ͷதͰϑϩΧϯͰ ஻ΕΔͱͨ͠ΒNuxt͔ͳ( ˘ω˘)

  9. ͱࢥͬͨͷͰ͕͢

  10. Nuxt͕௒ศརͳ͜ͱͱ͔ Έͳ͞Μඦ΋ঝ஌ͩͱࢥ͏͠

  11. 5෼ؒͷLTͰઆ໌ͨ͠ͱ͜ΖͰ ʮͦΕ͸ͦ͏ʯͱͳͬͯ͠·͍ͦ͏ͳͷͰ

  12. ࠓճ͸

  13. OVYUHFOFSBUFͨ͋͠ͱʹग़ͯ͘Δ EJTUΛԿ͔͠ΒͷϩʔΧϧαʔόʔͰ ֬ೝ͢Δͱࢥ͏ͷͰ͕͢

  14. ͦΕΛԿͰ֬ೝ͢Δͷ͕ྑ͍ͷ͔ͱ͍͏ ௒χονͳ࿩Λ͍ͨ͠ͱࢥ͍·͢ɻ

  15. ͱ͍͏Θ͚ͰվΊ·ͯ͠

  16. ఱԼҰDev Server෢ಓձ

  17. ࢀՃࢿ֨ w ϩʔΧϧͰ΢Σϒαʔόʔ͕ͨͭ͜ͱ w Command Line InterfaceΛ΋͍ͬͯΔ͜ͱ

  18. બखೖ৔

  19. No1. python -m SimpleHTTPServer ϫϯϥΠφʔαʔόʔքͷॏ௟

  20. No2. light-server (from npm)

  21. No3. budo (from npm)

  22. No4. serve (from npm)

  23. ධՁํ๏ w ֮͑΍͢͞ w ୯७ʹίϚϯυΛԿจࣈͰݺ΂Δ͔ w ৮Γ΍͢͞ w ΍Γ͍ͨ͜ͱΛαοͱͰ͖Δ͔ w

    ͦͷଞ w ػೳ໢ཏੑ΍࣮੷ͳͲ ࠓճ͸ҎԼͷ࣠ͰධՁ͍ͨ͠ͱࢥ͍·͢ɻ ֤఺Ͱɺ߹ܭ఺ຬ఺Ͱ͢ɻ
  24. 1ճઓ֮͑΍͢͞

  25. 1ճઓ͸୯७ʹͦͷίϚϯυΛ ԿจࣈͰݺͼग़ͤΔ͔Ͱ͢

  26. 5จࣈҎԼͳΒ3఺ 15จࣈҎԼͳΒ2఺ 20จࣈҎԼͳΒ1఺ ͦΕҎ্ͳΒ0఺

  27. 1ճઓ֮͑΍͢͞ w QZUIPON4JNQMF)5514FSWFS w 26จࣈ1఺ w MJHIUTFSWFS w 11จࣈ2఺ w

    CVEP w 4จࣈ3఺ w TFSWF w 5จࣈ3఺
  28. 2ճઓ৮Γ΍͢͞

  29. 2ճઓ͸৮Γ΍͢͞Ͱɺ ΍Γ͍ͨ͜ͱΛαοͱͰ͖Δ͔Ͱ͢

  30. ࠓճ͸

  31. ./distΛlocalhost:3000Ͱ ϗεςΟϯά͢Δͱ͍͏

  32. ͋Γ͕ͪͳγνϡΤʔγϣϯͰ ࢼͯ͠Έ͍ͨͱࢥ͍·͢

  33. No1.python -m SimpleHTTPServer w 42จࣈ΋͔͔Δ w ͦ΋ͦ΋EJTUΛϕʔεʹϗεςΟϯάΈ͍ͨͳ͜ͱ͕Ͱ͖ ͳ͍ͷͰDE͢Δඞཁ͕͋Δ w ͔ͳΓ࣮༻తͰ͸ͳ͍ͷͰ0఺

    $ cd dist && python -m SimpleHTTPServer 3000
  34. No2.light-server w 28จࣈͰ࣮ߦͰ͖Δ w Φϓγϣϯ΋௚ײతͰΘ͔Γ΍͍͢ w 3఺ $ light-server -s

    dist -p 3000
  35. No3.budo w 20จࣈͰ࣮ߦͰ͖Δ w Φϓγϣϯ΋௚ײతͰΘ͔Γ΍͍͢ ೔ຊਓʹ༏͍͠  w 3఺ $

    budo -d dist -p 3000
  36. No4.Terve w 60จࣈͰ࣮ߦͰ͖Δ w EJTUΛϕʔεʹϗεςΟϯάΈ͍ͨͳ͜ͱ͕ઃఆϑΝΠϧܦ ༝Ͱ͔͠σΩͳ͍ w 2ճ໨͔Β͸serve -l 3000ͷ13จࣈͰ࣮ߦͰ͖Δ

    w ͷͰ1఺͸͋͛ͪΌ͏ $ echo {\ public\ : \ dist\ } >> serve.json && serve -l 3000
  37. 3ճઓͦͷଞ

  38. ͦͷଞͰ͸ΞϐʔϧͰ͖Δ͜ͱΛ όγόγ্͛ͯಠஅͱภݟͰՃ఺͍͖ͯ͠·͢ɻ

  39. No1.python -m SimpleHTTPServer w ੈͷதͰҰ൪࢖ΘΕ͍ͯΔϩʔΧϧαʔόʔͰ͢ʂʂ w ͦ͏ͩͶ w 1఺Ճ఺

  40. No2.light-server w http2ʹରԠͰ͖Δ͜ͱΛചΓʹ͍ͯ͠Δʢ͍͢͝Ͷʣ w ػೳ໢ཏੑ΋ͳ͔ͳ͔͍͢͝ w IUUQTHJUIVCDPNUYDIFOMJHIUTFSWFS w 2఺Ճ఺

  41. No3.budo w GitHub Star 1400௒͑Ͱ͢ʂʂʢͦ͏ͩͶʣ w ػೳ໢ཏੑ͕͍͢͝Ͱ͢ʂʂʢ͔ͨ͠ʹ͍͢͝ʣ w IUUQTHJUIVCDPNNBUUEFTMCVEP w

    2఺Ճ఺
  42. No4.Terve w GitHub Star 3400௒͑Ͱ͢ʂʂʢ͍͢͝Ͷʣ w 1఺Ճ఺

  43. ݁Ռൃද

  44. ճઓ ճઓ ճઓ ߹ܭ QZUIPO ఺ ఺ ఺ ఺ MJHIUTFSWFS

    ఺ ఺ ఺ ఺ CVEP ఺ ఺ ఺ ఺ TFSWF ఺ ఺ ఺ ఺
  45. ͱ͍͏Θ͚Ͱ

  46. dev server

  47. budo

  48. ·ͱΊ w ࠓճͷ༏উ͸ɺ৮Γ΍͢͞ɾػೳ໢ཏੑͷ໘͔Βbudoʹ ܾఆ w http2Λ࢖༻͍ͨ͠ͱ͖͸light-serverΛ࢖͏ͱྑͦ͞͏ w ΋ͬͱଞʹྑͦ͞͏ͳͷ͋ΔͰʂΈ͍ͨͳͷ͋Ε͹࣍ճҎ߱ ͷϑϩΧϯͰୈೋճdev server෢ಓձ΍͍ͬͯͩ͘͞

  49. ऴΘΓ