Newly Purchased Memories

    @lakutata-component/typeorm
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.15 • Public • Published

    NPM Version NODE Version Known Vulnerabilities NPM Download

    Quickstart

    Step 1: Configure typeorm component

    const app = await createApp({
            id: 'test.app',
            name: 'tester',
            components: {
                typeorm: {
                    class: TypeOrmComponent,
                    options: {
                        type: 'mysql',
                        host: 'localhost',
                        port: 3306,
                        username: 'user',
                        password: 'passwd',
                        database: 'database',
                        synchronize: true,
                        entities: [
                            `${path.resolve(__dirname, './entities/*')}`
                        ]
                    } as MysqlConnectionOptions
                }
            }
        })
    

    Step 2: Get typeorm component

    const typeorm: TypeOrmComponent = app.Components.get<TypeOrmComponent>('typeorm')
    

    Step 3: Use it

    typeorm.getRepository(...)
    typeorm.getMongoRepository(...)
    typeorm.transaction(...)
    typeorm.query(...)
    ...
    

    @lakutata/core required.

    Documentations

    See Typeorm official documents

    How to Contribute

    Please let us know how can we help. Do check out issues for bug reports or suggestions first.

    License

    MIT

    Install

    npm i @lakutata-component/typeorm

    DownloadsWeekly Downloads

    53

    Version

    1.1.15

    License

    MIT

    Unpacked Size

    235 kB

    Total Files

    32

    Last publish

    Collaborators

    • myq1991