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

1.0.24 • Public • Published

Lexpi

Quickly define data model and use this model to build applications.

Usage

yarn add lexpi

or

yalc publish & yalc add lexpi / yal update

yalc push

for local development.

Initial setup

import { App, AppConfig, DbStrategy, RestStrategy } from 'lexpi';
import path from 'path';
console.log(path.resolve('db'));
const config: AppConfig = {
    enititesPath: path.resolve('src/models'),
    db: {
        strategy: DbStrategy.NeDb,
        dbPath: path.resolve('db'),
    },
    api: {
        enable: true,
        swagger: {
            enable: true,
            endpoint: '/documentation',
        },
        host: 'localhost',
        port: 3005,
        strategy: RestStrategy.Fastify,
    },
};
(async () => {
    const app = new App(config);
    await app.start();
})();

Readme

Keywords

none

Package Sidebar

Install

npm i lexpi

Weekly Downloads

1

Version

1.0.24

License

none

Unpacked Size

7.18 MB

Total Files

82

Last publish

Collaborators

  • kolarski