Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mostlyjs/mostly-feathers
Convert your Feathers APIs into microservices
https://github.com/mostlyjs/mostly-feathers
feathers microservice
Last synced: 3 months ago
JSON representation
Convert your Feathers APIs into microservices
- Host: GitHub
- URL: https://github.com/mostlyjs/mostly-feathers
- Owner: MostlyJS
- License: mit
- Created: 2017-05-01T16:09:13.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-01T21:05:49.000Z (over 2 years ago)
- Last Synced: 2024-09-18T09:27:53.597Z (5 months ago)
- Topics: feathers, microservice
- Language: JavaScript
- Homepage:
- Size: 209 KB
- Stars: 27
- Watchers: 2
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MostlyJS with Feathers
======================[![Build Status](https://travis-ci.org/mostlyjs/mostly-feathers.svg)](https://travis-ci.org/mostlyjs/mostly-feathers)
This module provides quick ways to create [MostlyJS](https://github.com/MostlyJS/mostly-node) microservices with [Feathers](https://feathersjs.com/).
# Documentation
Please see the [documentation site](https://mostlyjs.github.io).
# Usage
## Installation
```bash
npm install mostly-feathers --save
```## Quick Example
Convert your Feathers APIs into microservices is easy enough.
Your existing Feathers code
```javascript
// service.js
const memory = require('feathers-memory');module.exports = function() {
const app = this;// initialize service
const service = new memory();
app.use('dummies', service);
}
```Wrapping it as standalone server
```javascript
const nats = require('nats');
const mostly = require('mostly-node');
const feathers = require('mostly-feathers');
const service = require('./service');const trans = new mostly(nats.connect());
trans.ready(() => {
var app = feathers(trans)
.configure(service);
});
```That's all, the service will register itself with NATS and can be called remotely.
## RESTful Gateway
To expose the service as RESTful api, you need only setup a simple express gateway server using [mostly-feathers-rest](https://github.com/MostlyJS/mostly-feathers-rest)
# License
MIT