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

NuxtとFirebaseでSSRのWebアプリを作ってみた

 NuxtとFirebaseでSSRのWebアプリを作ってみた

yusuke_yamashita

May 28, 2019
Tweet

More Decks by yusuke_yamashita

Other Decks in Technology

Transcript

  1. ୭΋͕؆୯ʹ·Δ͹ͭΫΠζΛ࡞ΕͪΌ͏ $MPVE'JSFTUPSF VTFST\ ZVTVLF\ BHF  BEESFTT5PLZP ^  UBLVZB\

    BHF  BEESFTT*CBSBLJ ^ ^ DPMMFDUJPOʢVTFSTʣ EPDVNFOUʢZVTVLFʣ EBUBʢBESFTT5PLZPʣ
  2. ୭΋͕؆୯ʹ·Δ͹ͭΫΠζΛ࡞ΕͪΌ͏ $MPVE'JSFTUPSF JNQPSUpSFCBTFGSPNbpSFCBTF` DPOTUVTFS\BHF BEESFTT$IJCB^ DPOTUECpSFCBTFpSFTUPSF  ECDPMMFDUJPO bVTFST` EPD

    bUBSP` TFU VTFS ଞʹ΋ɺUSBOTBDUJPO΍Ұׅॻ͖ࠐΈͷػೳ΋උ͍͑ͯ·͢ɻ ৄ͘͠͸ެࣜυΩϡϝϯτΛࢀর͍ͯͩ͘͠͞ɻ IUUQTpSFCBTFHPPHMFDPNEPDTpSFTUPSF IMKB
  3. ୭΋͕؆୯ʹ·Δ͹ͭΫΠζΛ࡞ΕͪΌ͏ UFNQMBUF EJWSFGlUBSHFUz \\UJUMF^^ EJW UFNQMBUF TUZMF ͍͍ײ͡ͷσβΠϯ TUZMF TDSJQU

    JNQPSUIUNMDBOWBTGSPNbIUNMDBOWBT` ͍͍ײ͡ͷॲཧͷதʹೖΕΔ DPOTUEPNUIJTSFGTUBSHFU IUNMDBOWBT EPN UIFO DBOWBT\ DBOWBTUP#MPC CMPC\ VQMPBECMPC ^  ^  TDSJQU IUNMDBOWBT
  4. ୭΋͕؆୯ʹ·Δ͹ͭΫΠζΛ࡞ΕͪΌ͏ /VYUʷ$MPVE'VODUJPOTͷ443ͷྲྀΕ ϦΫΤετ IUUQTIPHFIPHFDPN Ϩεϙϯε w GVHBGVHBKQH w IUNM w

    ʜ ੩తϑΝΠϧͷ৔߹ pSFCBTFKTPOͰ ҎԼͷ༻ʹఆٛ 'JSFCBTF)PTUJOH +1( )5.- ϦΫΤετʹ߹க͢Δ ϑΝΠϧ͕ଘࡏ͢Δ
  5. ୭΋͕؆୯ʹ·Δ͹ͭΫΠζΛ࡞ΕͪΌ͏ /VYU$MPVE'VODUJPOTͷ443ͷྲྀΕ 443Λ΍Βͳ͔ͬͨ৔߹ w ϦΫΤετʹର͠ɺIPTUJOH͞ΕͨJOEFYIUNMΛϨεϙϯε ͱͯ͠ฦ٫ w ฦ٫͞ΕͨJOEFYIUNM͕ϒϥ΢βͰ+BWB4DSJQUΛಡΈࠐΜͰ %0.ΛϨϯμϦϯά w

    +BWB4DSJQUΛಡΈࠐ·ͳ͖Όҙਤͨ͠)5.-͸ϨϯμϦϯ ά͞Εͳ͍ w 5XJUUFS΍GBDFCPPLͷCPU͸+BWB4DSJPUΛಡΜͰ͘Εͳ͍ʂ w 0(1λάʢNFUBλάʣΛࢦఆͯ͠΋ɺ5XJUUFS΍GBDFCPPL ͷCPU͸ҙਤ௨Γʹղऍͯ͘͠Εͳ͍ʂ w /VYUͷ৔߹ɺશϖʔδڞ௨ͰNFUBλάΛઃఆͰ͖Δ͕ɺݸ ผͰ͸+BWB4DSJQUͰϨϯμϦϯά͠ͳ͍ͱઃఆͰ͖ͳ͍
  6. ୭΋͕؆୯ʹ·Δ͹ͭΫΠζΛ࡞ΕͪΌ͏ 'JSFCBTF)PTUJOH pSFCBTFKTPOʢ֘౰ՕॴͷΈൈਮʣ \ IPTUJOH\ SFXSJUFT< \ TPVSDF  

    GVODUJPOOVYU"QQ ^ > ^ ^ શͯͷϦΫΤετʹରͯ͠ɺ $MPVE'VODUJPOTͷOVYU"QQ Λ࣮ߦ͢Δɻ ͨͩ͠ɺϦΫΤετΛॲཧ͢ Δʹ͸༏ઌ౓͕͋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