Skip to content

codeitlikemiley/ntex-turso-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages