Package Exports
- report-developer-server
- report-developer-server/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (report-developer-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Report Developer Server
Report Developer Server is a report developer's server side package that facilitates database operations for report development and management.
Features
- Database Connection: Establish a connection to a database by providing credentials.
- Save Reports: Save new report in the connected database.
- Retrieve Reports: Retrieve all saved reports from the connected database.
- Report Development: Execute custom queries for report development purposes.
Installation
To install the package, use npm:
npm install report-developer-serverUsage
Import all 4 methods provided by the report-developer-server
import {
connect,
saveReport,
getReports,
reportDeveloper,
} from "report-developer-server";Connect
Connect() is used inorder to establish a connection to a database. It takes two parameters:
dbCredentials - is an object of database credentials with host, port, user, password, and database feilds. logs - is to be set to true if you want success & error logs. By default its value is false.
const dbCredentials = {
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
};
try {
connect(dbCredentials, true);
} catch (error) {
console.error(error);
}