Coder Social home page Coder Social logo

ws998116 / app-at-the-polls Goto Github PK

View Code? Open in Web Editor NEW

This project forked from turso-extended/app-at-the-polls

0.0 0.0 0.0 64 KB

A poll making website built with Sveltekit, Turso, and Drizzle.

Home Page: https://turso-at-the-polls.vercel.app/

License: MIT License

JavaScript 5.08% TypeScript 37.83% CSS 0.39% HTML 1.12% Svelte 55.59%

app-at-the-polls's Introduction

Turso at the polls

An poll-making website.

Technologies used.

Database Setup

Install the Turso CLI.

Create a new turso database.

turso db create turso-at-the-polls

Note

We use turso-at-the-polls as the database name in this command, but you can give it any name.

To access the data stored inside your database, you need the Turso database url and an authentication token.

To obtain the database url, run the following command:

turso db show turso-at-the-polls --url

And, to create an authentication token for your database, run:

turso db tokens create turso-at-the-polls

Add a .env file with the following variables, populating them with the values obtained above.

VITE_TURSO_DB_AUTH_TOKEN=<AUTH-TOKEN>
VITE_TURSO_DB_URL=<DB-URL>

Schema generation and migration

To generate the database schema with Drizzle, run:

npm run drizzle:generate

Migrate the generated database schema by running:

npm run drizzle:migrate

Developing

Once you've created a database, generated, and migrate the schema by following the instructions above, install the project's dependencies by running:

npm install

To start a development server, run:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Note

Do not stage the .env file used in local development.

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

app-at-the-polls's People

Contributors

xinnks 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.