@statale/feathers-environment
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@statale/feathers-environment

A more low level alternative to @feathersjs/configuration

Installation

npm install --save @statale/feathers-environment 

Documentation

import feathers from '@feathersjs/feathers';
import express from '@feathersjs/express';
import { environment } from '@statale/feathers-environment';

import { Application } from './declarations';

const app: Application = express(feathers());

// import config from anywhere or any config library
const config = {
    host: "localhost",
    port: 3030,
    mongodb: "mongodb://localhost:27017/myapp",
};

// Load app configuration
app.configure(environment({
    config,
}));

// access config properties using the app
console.log(app.get('host'));
console.log(app.get('port'));
console.log(app.get('mongodb'));

Development

This library was generated with Nx.

Running unit tests

Run nx test feathers-environment to execute the unit tests via Jest.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @statale/feathers-environment

      Weekly Downloads

      1

      Version

      0.0.2

      License

      Apache-2.0

      Unpacked Size

      15 kB

      Total Files

      9

      Last publish

      Collaborators

      • lwhiteley