This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install npm i pg-mem --save-dev | |
import { DataSource, Repository } from 'typeorm'; | |
import { newDb, DataType } from 'pg-mem'; | |
import { v4 } from 'uuid'; | |
const setupDataSource = async () => { | |
const db = newDb({ | |
autoCreateForeignKeyIndices: true, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am a-h-i on github. | |
* I am lpwstr (https://keybase.io/lpwstr) on keybase. | |
* I have a public key ASAeu9XqvEQXhy7_yyBguy61AWqI220AFLoIfsIn4Lnemwo | |
To claim this, I am signing this object: |