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();
})();