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

CloudflareでつくるサーバーレスCRUD

 CloudflareでつくるサーバーレスCRUD

Cloudflare Meetup Okinawa Kick Off!での発表資料です
https://cfm-cts.connpass.com/event/277590

shiro seike

April 28, 2023
Tweet

More Decks by shiro seike

Other Decks in Technology

Transcript

  1. Cloudflare CRUD
    Cloudflare Meetup Okinawa Kick Off!
    2
    0
    23
    .
    4
    .
    27



    @seike
    4
    60
    1

    View full-size slide

  2. @seike
    460
    -


    - @seike
    46
    0

    - Fusic


    - /


    - / /

    -


    - Fukuoka.php


    - Fukuoka.go


    - Serverless Meetup Fukuoka


    - Stripe_JP Fukuoka


    - Cloudflare Meetup Fukuoka
    2

    View full-size slide

  3. Cloudflare Meetup Fukuoka Vol.
    1
    3
    2023/07/14( ) 19:00 21:00


    Fusic


    Cloudflare Meetup Fukuoka Vol.
    1

    View full-size slide

  4. Agenda
    1
    .Cloudflare


    2
    .


    3
    .


    4
    .
    4

    View full-size slide

  5. 01
    Cloudflare

    View full-size slide

  6. Cloudflare
    っCDN (Content Delivery Network)



    っDNS (Domain Name System)




    っDDoS



    っWAF (Web Application Firewall)



    っ (Cloudflare Workers)



    っ (Cloudflare Pages)


    6

    View full-size slide



  7. Cloudflare Meetup Okinawa Kick Off!
    10

    View full-size slide

  8. Cloudflare CRUD
    Cloudflare CRUD


    っCloudflare Pages



    っCloudflare Workers



    っCloudflare Workers D
    1


    SQL

    っCI/CD


    GitHub Actions CI Cloudflare CD
    11

    View full-size slide

  9. Cloudflare Pages

    - Jamstack


    -


    - SSL


    -


    -


    - Git


    -
    12

    View full-size slide

  10. Cloudflare Workers


    JavaScript WebAssembly


    -


    -


    -


    -


    Pages Functions D
    1
    Workers
    13

    View full-size slide

  11. Cloudflare Workers D
    1
    SQL


    - &


    - SQLite


    - Cloudflare Workers
    14

    View full-size slide

  12. CI/CD (Cloudflare Pages)
    GitHub Actions CI Cloudflare CD


    GitHub Actions


    CD Cloudflare
    15

    View full-size slide

  13. Hono.js
    HonoJS Cloudflare Workers



    API



    SvelteKit
    19

    View full-size slide

  14. Hono Examples
    https://github.com/honojs/examples


    Examples Blog


    KV D
    1
    Database
    20

    View full-size slide

  15. src/api.ts (select)
    21
    api.get (`URL`)


    Routing



    Api.get Model

    View full-size slide

  16. src/model.ts (select)
    22
    D
    1
    Database Query



    API

    View full-size slide

  17. src/api.ts (Insert)
    23
    api.post (`URL`) Post


    Post Body


    Model

    View full-size slide

  18. src/model.ts (Insert)
    24
    Post Body


    Insert


    ID
    UUID

    View full-size slide

  19. 25
    HonoJS

    D
    1
    Database



    R
    2

    View full-size slide

  20. SQL
    26
    ORM Prisma

    Node.js Node.js API
    2023/03/23)


    Prisma

    View full-size slide

  21. 28
    Cloudflare Pages
    Point
    1
    Cloudflare Workers D
    1
    SQL
    Point
    2
    HonoJS Sample HonoJS
    Point
    3
    Cloudflare R
    2
    Prisma ORM ORM
    Point
    4

    View full-size slide

  22. Thank You
    We are Hiring !


    https://recruit.fusic.co.jp/

    View full-size slide