Skip to content

Commit 38270eb

Browse files
authored
Merge pull request #7 from sanderlissenburg/doc_update_for_ormconfig_usage
2 parents fe0300e + 47468cf commit 38270eb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,15 @@ await createConnection({
4242
namingStrategy: new SnakeNamingStrategy(), // Here you'r using the strategy!
4343
});
4444
```
45+
46+
Alternatively you can use it in combination with a `ormconfig.js`
47+
48+
```js
49+
// Use require instead of import
50+
const SnakeNamingStrategy = require("typeorm-naming-strategies").SnakeNamingStrategy
51+
52+
module.exports = {
53+
...
54+
namingStrategy: new SnakeNamingStrategy(),
55+
}
56+
```

0 commit comments

Comments
 (0)