Skip to content

Latest commit

 

History

History
114 lines (70 loc) · 1.66 KB

README.md

File metadata and controls

114 lines (70 loc) · 1.66 KB

Ntex with Turso

Build web server with the #1 Fastest Framework, and Scale your Database with Turso.

Requirements

Cli tools

1. Set Up Turso Credentials
  1. Signup at turso (optional if you already have an account)
turso auth signup
  1. Login to your turso cli
turso auth login
  1. create database
turso db create <database-name>
  1. get your DATABASE_URL
turso db show --url <database-name>
  1. get your DATABASE_TOKEN
turso db tokens create <database-name>
  1. update .env
DATABASE_URL=libsql://[dbname]-[username].turso.io
DATABASE_TOKEN=your_token
2. Managing Migrations with `geni`
  1. export ENV
export DATABASE_URL=libsql://[dbname]-[username].turso.io
export DATABASE_TOKEN=[token]
  1. Create new Migration
geni new create_users_table
  1. Fill up your *.up.sql and *.down.sql schema

*.up.sql

CREATE TABLE users (
ID INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT
);

*.down.sql

DROP TABLE users;
  1. Run your migration (optional)

when we run our app it would automatically run the migration.

geni up

References

turso rust sdk

local development

encryption at production

ntex