Skip to content

Commit 535b5ec

Browse files
committed
JavaScript/TypeORM: Update README
1 parent 887f083 commit 535b5ec

File tree

2 files changed

+58
-7
lines changed

2 files changed

+58
-7
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ __pycache__
44
.coverage
55
coverage.xml
66
mlruns/
7-
archive/
8-
logs.log
7+
node_modules/
Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,59 @@
1-
# Awesome Project Build with TypeORM
1+
# Using CrateDB with TypeORM
22

3-
Steps to run this project:
43

5-
1. Run `npm i` command
6-
2. Setup database settings inside `data-source.ts` file
7-
3. Run `npm start` command
4+
## About
5+
6+
[TypeORM] is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic,
7+
React Native, NativeScript, Expo, and Electron platforms and can be used with
8+
TypeScript and JavaScript (ES5, ES6, ES7, ES8).
9+
10+
11+
## Details
12+
13+
This example shows the canonical TypeORM example project using CrateDB. It has
14+
been scaffolded using this command:
15+
```shell
16+
npx typeorm init --name . --database postgres --express
17+
```
18+
A few adjustments have been made because CrateDB does not support the `SERIAL`
19+
data type.
20+
21+
22+
## Data Model
23+
24+
The data model for the `User` entity is defined in [`User.ts`](./src/entity/User.ts).
25+
26+
27+
## Usage
28+
29+
```shell
30+
# Install dependencies.
31+
npm install
32+
33+
# Run program.
34+
npm start
35+
```
36+
37+
38+
## Development
39+
40+
Link a TypeORM working tree to a downstream project.
41+
42+
```shell
43+
cd /path/to/somewhere
44+
git clone https://github.com/crate-workbench/typeorm --branch cratedb
45+
cd typeorm
46+
npm run package
47+
cd build/package
48+
npm link
49+
50+
cd /path/to/here
51+
npm link typeorm
52+
```
53+
54+
### References
55+
- https://orkhan.gitbook.io/typeorm/DEVELOPER
56+
- https://medium.com/dailyjs/how-to-use-npm-link-7375b6219557
57+
58+
59+
[TypeORM]: https://typeorm.io/

0 commit comments

Comments
 (0)