Giter VIP home page Giter VIP logo

trpc-nuxt's Introduction

Nuxt3 / tRPC / Drizzle ORM / CloudFlare D1

Demo project.

Setup local dev

Fork demo repo: https://github.com/juretopolak/trpc-nuxt

git clone https://github.com/[username]/trpc-nuxt
cd trpc-nuxt
yarn install

Setup CloudFlare Page

  • Login in CloudFlare > Workers & Pages
  • Create aplication > Pages
  • Connect to Git > Select new [trpc-nuxt] repo
  • Begin setup and deploy with settings:
Build command: npx nuxi generate
Build output directory: /dist
Root directory: /
Build comments on pull requests: Enabled
  • Page > Settings > Environment variables > Add variables
YARN_ENABLE_IMMUTABLE_INSTALLS = false

Setup CloudFlare D1 (Database)

  • Workers & Pages > D1
  • Create database (Dashboard)
  • Copy Database name and ID to wrangler.toml

Bind Database to Page

  • Workers & Pages > [trpc-nuxt] > Settings
  • Functions > D1 database bindings
  • Edit bindings > Add variable
DB = trpc-nuxt

Create local development server

wrangler login
wrangler d1 migrations apply DB --local
wrangler pages dev --local --d1=DB -- yarn dev

Push to deploy

Push and check new deployment in CloudFlare.

git push

trpc-nuxt's People

Contributors

juretopolak avatar

Watchers

 avatar

Forkers

miaobuao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.