All Projects → luke3butler → feathers-versionate

luke3butler / feathers-versionate

Licence: MIT license
Create and work with nested services.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to feathers-versionate

flutter feathersjs.dart
Communicate with your feathers js server from flutter app with unbelieved ease and make happy your customers.
Stars: ✭ 19 (-34.48%)
Mutual labels:  feathers, feathersjs
moleculer-adapter-feathers
Moleculer service mixin wrapping Feathers.js services
Stars: ✭ 17 (-41.38%)
Mutual labels:  feathers, feathersjs
FlipED
A LMS built specifically for Thailand's Education 4.0 system.
Stars: ✭ 24 (-17.24%)
Mutual labels:  feathers, feathersjs
Feathers
A framework for real-time applications and REST APIs with JavaScript and TypeScript
Stars: ✭ 13,761 (+47351.72%)
Mutual labels:  feathers, feathersjs
radlkarte
Hand-crafted routing information for cyclists
Stars: ✭ 14 (-51.72%)
Mutual labels:  routes
feathers-solr
Feathersjs Solr Client
Stars: ✭ 29 (+0%)
Mutual labels:  feathers
Jolf
A golfier prefix version of JavaScript
Stars: ✭ 13 (-55.17%)
Mutual labels:  prefix
zuul-route-jdbc-spring-cloud-starter
No description or website provided.
Stars: ✭ 23 (-20.69%)
Mutual labels:  routes
moyu
基于 Vue 和 Electron 的在线协同api接口管理工具。接口文档管理工具、接口工具、接口文档、api文档、api工具、快乐摸鱼
Stars: ✭ 300 (+934.48%)
Mutual labels:  api-management
umi-plugin-menus
将 umi 生成的 routes 转换成 tree 结构 menus 数据,开发中可直接引入该文件来进行导航菜单的生成
Stars: ✭ 29 (+0%)
Mutual labels:  routes
fastify-loader
The route loader for the cool kids!
Stars: ✭ 17 (-41.38%)
Mutual labels:  routes
distube-music-bot
An advanced music bot based on distube.js.org with filters and more
Stars: ✭ 24 (-17.24%)
Mutual labels:  prefix
type-arango
🥑 TypeArango manages ArangoDB collections, documents, relations and routes by taking advantage of TypeScript typings.
Stars: ✭ 55 (+89.66%)
Mutual labels:  routes
global-prefix
Get the npm global path prefix. Same code used internally by npm.
Stars: ✭ 27 (-6.9%)
Mutual labels:  prefix
ertuo
Ertuo: quick routing for PHP
Stars: ✭ 29 (+0%)
Mutual labels:  routes
feathers-vuex-todomvc
Feathers-vuex TodoMVC demo
Stars: ✭ 29 (+0%)
Mutual labels:  feathers
krawler
A minimalist (geospatial) ETL
Stars: ✭ 51 (+75.86%)
Mutual labels:  feathersjs
intelliroutes
Support for Play Routes in IntelliJ IDEA
Stars: ✭ 21 (-27.59%)
Mutual labels:  routes
railways
A plugin for RubyMine and IntelliJ IDEA Ultimate that adds a panel with routes of Ruby on Rails application.
Stars: ✭ 44 (+51.72%)
Mutual labels:  routes
fastify-register-routes
Plugin to automatically load routes from a specified path and optionally limit loaded file names by a regular expression.
Stars: ✭ 15 (-48.28%)
Mutual labels:  routes

feathers-versionate

About

Service nesting for feathersjs

Nests services under configurable base paths, and provides easy methods to access those services.

Getting Started

Install the module

NPM: npm install feathers-versionate --save

Yarn: yarn add feathers-versionate

var feathers = require('feathers');
var versionate = require('feathers-versionate');
var memory = require('feathers-memory');

const app = feathers();
// Configure versionate
app.configure(versionate());
// Register a base-path "/api/v2", and provide access to it via `app.v2`
app.versionate('v2', '/api/v2/');
// Now you can use `app.v2` to create and access services under the registered path!
app.v2.use('/users', memory); // http://localhost:3030/api/v2/users
// We can access services easily too!
const userService = app.v2.service('users');

Documentation

feathers-versionate It a utility that creates wrappers for app.use and app.service with nested root paths.

  • app.versionate(name, basePath)
  • app.versionate.register(name, basePath) (app.versionate alias)

feathers-versionate services

  • app.versionateName.use(path, service)
    • wraps app.use and includes the versionate basePath behind the scenes
  • app.versionateName.service(path)
    • wraps app.service and includes the versionate basePath behind the scenes

Examples

const app = feathers();
// Configure versionate
app.configure(versionate());
// Register a versionate base paths
app.versionate('v1', '/api/v1/');
// You can register as many "versionations" as you'd like
app.versionate('v2', '/api/v2/');
// If the 3rd argument is set to true, the service will be nested under app.versionate
app.versionate('docs', 'docs', true);
// Nesting under versionate is useful if you don't want to pollute `app` with lots of children
app.versionate.docs.use('quick-guide');

// Once registered, you can use app.versionateName anywhere in your app!
app.v1.use('/users', userServiceV1);
app.v2.use('/users', userServiceV2);

// Retrieve a service through the versionate name
const usersV2 = app.v2.service('users');
// You can also access services by their full path on app.service
const usersV1 = app.service('/api/v1/users');

// Use the service just like normal
usersV2.find().then(items => console.log('.find()', items));

Release History

0.2.2

  • Fix/add support for win32 systems

0.2.0

  • Add app.versionate as main function
  • Add tests
  • Fix app.versionate nesting of service access methods

0.1.0

  • Initial release
  • Support for app.use and app.service
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].