0.3.0 • Published 9 months ago

@overture-stack/lyric v0.3.0

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
github
Last release
9 months ago

Lyric

NPM Version

Install

npm i @overture-stack/lyric

Usage

Import AppConfig and provider from @overture-stack/lyric module to initialize the provider with custom configuration:

import { AppConfig, provider } from '@overture-stack/lyric';

const appConfig: AppConfig = {
	db: {
		host: [INSERT_DB_HOST],
		port: [INSERT_DB_PORT],
		database: [INSERT_DB_NAME],
		user:[INSERT_DB_USER],
		password: [INSERT_DB_PASSWORD],
	},
	features: {
		audit: {
			enabled: [INSERT_AUDIT_ENABLED]
		}
	},
	schemaService: {
		url: [INSERT_LECTERN_URL],
	},
	limits: {
		fileSize: [INSERT_UPLOAD_LIMIT],
	},
	logger: {
		level: [INSERT_LOG_LEVEL],
	},
};


const lyricProvider = provider(appConfig);

Use any of the resources available on provider on a Express server:

  • Import a router:
import express from 'express';

const app = express();

app.use('/submission', lyricProvider.routers.submission);

Support & Contributions