Skip to content

Latest commit

 

History

History

drizzle

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

drizzle-eql

This is a example using the drizzle-orm.

Prerequisites

  • PostgreSQL database
  • CipherStash credentials and account

Setup

  1. Create a PostgreSQL database and a user with read and write permissions.
  2. Create a .env file in the root directory of the project with the following content:
DATABASE_URL="postgresql://[username]:[password]@[host]:5432/[database]"
CS_CLIENT_ID=[client-id]
CS_CLIENT_KEY=[client-key]
CS_WORKSPACE_ID=[workspace-id]
CS_CLIENT_ACCESS_KEY=[access-key]
  1. Run the following command to install the dependencies:
npm install
  1. Run the following command to insert a new user with an encrypted email:
npx tsx src/insert.ts --email [email protected]
  1. Run the following command to select all the encrypted emails from the database:
npx tsx src/select.ts

License

This project is licensed under the MIT License.