This repo contains an example "Hello World" TypeScript application that uses the TypeORM framework to connect to CockroachDB.
To run the code:
-
Start a demo CockroachDB cluster from the command line:
cockroach demo --empty
-
Create a
bank
database and a user and password as described in Build a TypeScript App with CockroachDB. -
From the SQL client:
> GRANT ALL ON DATABASE bank TO user;
-
If necessary, update the
ormconfig.json
file with the correct connection values. -
In your terminal, from the top of this project directory:
$ npm i $ npm start