Giter Club home page Giter Club logo

epic-stack's Introduction

Turso Logo

Epic Stack with Turso

This is an example of how to integrate Turso database with the Epic Stack.

Set Environment Variables

You need to add the database URL and access token as environment variables:

TURSO_DATABASE_URL=
TURSO_AUTH_TOKEN=

You can get both values on the Turso web app or using the Turso CLI.

If you decided to use the CLI, you can create a database named epic-stack-example by running the following command:

turso db create epic-stack-example

To get the URL of your database, run the command below and set its result to TURSO_DATABASE_URL:

turso db show epic-stack-example --url

In the same way, to get a database token, run the command below and set its result to TURSO_AUTH_TOKEN:

turso db tokens create epic-stack-example

Seed Your Database

Seed your database with this command:

turso db shell epic-stack-example < prisma/migrations/20230914194400_init/migration.sql

Migrations

To apply migrations to your database, run the migrate command:

npx prisma migrate dev --name add_subtitle_to_notes

Then, copy the migration file path from the new migration folder and run turso db shell:

turso db shell epic-stack-example < prisma/migrations/20240402084116_add_subtitle_to_notes/migration.sql

epic-stack's People

Contributors

alemtuzlak avatar andrecasal avatar arpitdalal avatar benhsm avatar chessydk avatar devlinmorrow avatar edmundhung avatar fredericrous avatar giovannibenussi avatar hakimlyon avatar jacobparis avatar kentcdodds avatar kiliman avatar l-steinmacher avatar mediabakery avatar michaeldeboey avatar mosattler avatar mxschmitt avatar nathanvale avatar nichtsam avatar onemen avatar paolapog avatar rajeshg avatar rperon avatar rustworthy avatar samialdury avatar simonswiss avatar vinstah avatar xhomu avatar xstevenyung avatar

Watchers

 avatar

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.