Welcome To DenoGres
To begin, let's download DenoGres! Execute the following CLI command in the terminal - this will give you access to DenoGres's CLI functionality.
deno install --allow-read --allow-write --allow-net --allow-env --allow-run --name denogres https://deno.land/x/denogres/mod.ts
After installation is complete, ensure deno is added to PATH.
Using DenoGres
Before using DenoGres in a project, run the command below. This will create the following in your project's root directory:
- 1. an .env file for your database connection URI
- 2. a models folder for your model.ts file
- 3. a Migrations folder for migration logs and model snapshots
denogres --init
After running the init command, update the .env file to contain your database's connection URI.
DATABASE_URI=driver://user:password@host:port/database_name
With all the set-up steps complete, you're ready to introspect your database! Database introspection will automatically create TypeScript models of your database tables in the .models/model.ts file.
denogres --db-pull