lucidy
TypeScript icon, indicating that this package has built-in type declarations

0.12.0 • Public • Published

npm version

Lucidy

Lucidy is a Typescript ORM created on top of Lucid ORM (AdonisJS V5)

Why

AdonisJS is a great framework and it has one of the best ORM. But it works only in the AdonisJS framework.

Installation

npm install lucidy

Usage

Your project

Add this line at the very main file of your app, before any code

import 'lucidy';

Customization

Add a file called lucidyconfig in the root of your project with the following options:

// lucidyconfig.js
module.exports = {
  directories: {
    models: 'my-custom-models-folder', // default -> models
    seeders: 'my-custom-seeders-folder', // default -> database/seeders
    migrations: 'my-custom-migrations-folder', // default -> database/migrations
  },
  database: {
    connection: 'pg',
    connections: {
      pg: {
        client: 'pg',
        connection: {
          host: '127.0.0.1',
          port: 5432,
          user: 'user',
          password: 'pass',
          database: 'my-database',
        },
      },
    },
  },
};

CMD

You can use all commands related to Lucid. Run this to see all options:

npx ace --help

Typescript

If your code editor does not recognize the Lucid imports, add the Lucid types in you tsconfig.json:

"types"["@adonisjs/lucid"]

Documentation

You can follow this documentation

Author

Gideão Silva

Package Sidebar

Install

npm i lucidy

Weekly Downloads

5

Version

0.12.0

License

MIT

Unpacked Size

19 kB

Total Files

38

Last publish

Collaborators

  • gideaoms