How to use @feathersjs/configuration - 10 common examples

To help you get started, we’ve selected a few @feathersjs/configuration examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github feathers-plus / generator-feathers-plus / test-expands / ts-cumulative-1-generic.test-expected / src1 / app.ts View on Github external
import middleware from './middleware';
import services from './services';
import appHooks from './app.hooks';
import channels from './channels';
// tslint:disable-next-line
const generatorSpecs = require('../feathers-gen-specs.json');
import authentication from './authentication';

// !code: imports // !end
// !code: init // !end

const app = express(feathers());
// !code: use_start // !end

// Load app configuration
app.configure(configuration());
// ! code: init_config
app.set('generatorSpecs', generatorSpecs);
// !end

// Enable security, CORS, compression, favicon and body parsing
app.use(helmet(
  // !code: helmet_config // !end
));
app.use(cors(
  // !code: cors_config // !end
));
app.use(compress(
  // !code: compress_config // !end
));
app.use(express.json(
  // !code: json_config // !end
github feathers-plus / generator-feathers-plus / test / ts-cumulative-1-memory.test-expected / src1 / app.ts View on Github external
import middleware from './middleware';
import services from './services';
import appHooks from './app.hooks';
import channels from './channels';
// tslint:disable-next-line
const generatorSpecs = require('../feathers-gen-specs.json');
import authentication from './authentication';

// !code: imports // !end
// !code: init // !end

const app = express(feathers());
// !code: use_start // !end

// Load app configuration
app.configure(configuration());
// ! code: init_config
app.set('generatorSpecs', generatorSpecs);
// !end

// Enable security, CORS, compression, favicon and body parsing
app.use(helmet());
app.use(cors());
app.use(compress());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(favicon(path.join(app.get('public'), 'favicon.ico')));
// Host the public folder
app.use('/', express.static(app.get('public')));
// !code: use_end // !end

// Set up Plugins and providers
github feathers-plus / generator-feathers-plus / test / ts-cumulative-1-mongoose.test-expected / src1 / app.ts View on Github external
import services from './services';
import appHooks from './app.hooks';
import channels from './channels';
// tslint:disable-next-line
const generatorSpecs = require('../feathers-gen-specs.json');
import authentication from './authentication';

import mongoose from './mongoose';
// !code: imports // !end
// !code: init // !end

const app = express(feathers());
// !code: use_start // !end

// Load app configuration
app.configure(configuration());
// ! code: init_config
app.set('generatorSpecs', generatorSpecs);
// !end

// Enable security, CORS, compression, favicon and body parsing
app.use(helmet());
app.use(cors());
app.use(compress());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(favicon(path.join(app.get('public'), 'favicon.ico')));
// Host the public folder
app.use('/', express.static(app.get('public')));
// !code: use_end // !end

// Set up Plugins and providers
github feathers-plus / generator-feathers-plus / test-expands / ts-cumulative-1-mongoose.test-expected / src1 / app.ts View on Github external
import services from './services';
import appHooks from './app.hooks';
import channels from './channels';
// tslint:disable-next-line
const generatorSpecs = require('../feathers-gen-specs.json');
import authentication from './authentication';

import mongoose from './mongoose';
// !code: imports // !end
// !code: init // !end

const app = express(feathers());
// !code: use_start // !end

// Load app configuration
app.configure(configuration());
// ! code: init_config
app.set('generatorSpecs', generatorSpecs);
// !end

// Enable security, CORS, compression, favicon and body parsing
app.use(helmet(
  // !code: helmet_config // !end
));
app.use(cors(
  // !code: cors_config // !end
));
app.use(compress(
  // !code: compress_config // !end
));
app.use(express.json(
  // !code: json_config // !end
github feathers-plus / generator-feathers-plus / test-expands / ts-cumulative-1-mongo.test-expected / src1 / app.ts View on Github external
import services from './services';
import appHooks from './app.hooks';
import channels from './channels';
// tslint:disable-next-line
const generatorSpecs = require('../feathers-gen-specs.json');
import authentication from './authentication';

import mongodb from './mongodb';
// !code: imports // !end
// !code: init // !end

const app = express(feathers());
// !code: use_start // !end

// Load app configuration
app.configure(configuration());
// ! code: init_config
app.set('generatorSpecs', generatorSpecs);
// !end

// Enable security, CORS, compression, favicon and body parsing
app.use(helmet(
  // !code: helmet_config // !end
));
app.use(cors(
  // !code: cors_config // !end
));
app.use(compress(
  // !code: compress_config // !end
));
app.use(express.json(
  // !code: json_config // !end
github autoai-org / AID / components / discovery / src / app.ts View on Github external
import express from '@feathersjs/express';
import { Application } from './declarations';
import logger from './logger';
import middleware from './middleware';
import services from './services';
import appHooks from './app.hooks';
import channels from './channels';
import authentication from './authentication';
import mongoose from './mongoose';

// Don't remove this comment. It's needed to format import lines nicely.

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

// Load app configuration
app.configure(configuration());
// Enable security, CORS, compression, favicon and body parsing
app.use(helmet());
app.use(cors());
app.use(compress());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(favicon(path.join(app.get('public'), 'favicon.ico')));
// Host the public folder
app.use('/', express.static(app.get('public')));

// Set up Plugins and providers
app.configure(express.rest());


app.configure(mongoose);
github feathers-plus / generator-feathers-plus / examples / ts / 05-secret / feathers-app / src / app.ts View on Github external
import services from './services';
import appHooks from './app.hooks';
import channels from './channels';
// tslint:disable-next-line
const generatorSpecs = require('../feathers-gen-specs.json');
import authentication from './authentication';

import mongoose from './mongoose';
// !code: imports // !end
// !code: init // !end

const app = express(feathers());
// !code: use_start // !end

// Load app configuration
app.configure(configuration());
// ! code: init_config
app.set('generatorSpecs', generatorSpecs);
// !end

// Enable security, CORS, compression, favicon and body parsing
app.use(helmet());
app.use(cors());
app.use(compress());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(favicon(path.join(app.get('public'), 'favicon.ico')));
// Host the public folder
app.use('/', express.static(app.get('public')));
// !code: use_end // !end

// Set up Plugins and providers
github mariusandra / insights / packages / insights-api / src / app.ts View on Github external
import socketio from '@feathersjs/socketio';


import { Application } from './declarations';
import logger from './logger';
import middleware from './middleware';
import services from './services';
import appHooks from './app.hooks';
import channels from './channels';
import authentication from './authentication';
// Don't remove this comment. It's needed to format import lines nicely.

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

// Load app configuration
app.configure(configuration());

if (process.env.INSIGHTS_DATA) {
  app.set('nedb', process.env.INSIGHTS_DATA)
}
  
// Enable security, CORS, compression, favicon and body parsing
app.use(helmet());
app.use(cors());
app.use(compress());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(favicon(path.join(app.get('public'), 'favicon.ico')));
// Host the public folder
app.use('/', express.static(app.get('public')));

// Set up Plugins and providers
github timmo001 / home-panel / api / src / app.ts View on Github external
import socketio from '@feathersjs/socketio';
import swagger from 'feathers-swagger';

import { Application } from './declarations';
import logger from './logger';
import middleware from './middleware';
import services from './services';
import appHooks from './app.hooks';
import channels from './channels';
import authentication from './authentication';
// Don't remove this comment. It's needed to format import lines nicely.

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

// Load app configuration
app.configure(configuration());
// Enable security, CORS, compression, favicon and body parsing
app.use(helmet());
app.use(cors());
app.use(compress());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(favicon(path.join(app.get('public'), 'favicon.ico')));
// Host the public folder
app.use(express.static(app.get('public')));

// Set up Plugins and providers
app.configure(express.rest());
app.configure(socketio());
app.configure(
  swagger({
    docsPath: '/api/docs',
github DefinitelyTyped / DefinitelyTyped / types / feathersjs__configuration / feathersjs__configuration-tests.ts View on Github external
import feathers, { Application } from '@feathersjs/feathers';
import feathersConfiguration from '@feathersjs/configuration';

const app: Application = feathers().configure(feathersConfiguration());

@feathersjs/configuration

A small configuration module for your Feathers application.

MIT
Latest version published 5 days ago

Package Health Score

92 / 100
Full package analysis

Popular @feathersjs/configuration functions