Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MostlyJS/mostly-feathers-rest
Expose your Feathers microservice as a RESTful API
https://github.com/MostlyJS/mostly-feathers-rest
feathers microservices rest-api
Last synced: 2 months ago
JSON representation
Expose your Feathers microservice as a RESTful API
- Host: GitHub
- URL: https://github.com/MostlyJS/mostly-feathers-rest
- Owner: MostlyJS
- License: mit
- Created: 2017-05-01T16:11:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-07T13:04:25.000Z (over 3 years ago)
- Last Synced: 2024-11-14T23:02:31.569Z (2 months ago)
- Topics: feathers, microservices, rest-api
- Language: JavaScript
- Homepage:
- Size: 187 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-feathersjs - mostly-feathers-rest - Expose your microservice as a RESTful API (Plugins / Scaling)
README
MostlyJS Feathers Handler
=========================[![Build Status](https://travis-ci.org/mostlyjs/mostly-feathers-rest.svg)](https://travis-ci.org/mostlyjs/mostly-feathers-rest)
This module provides an express middleware as a RESTful gateway to call microservice writing with [mostly-feathers](https://github.com/MostlyJS/mostly-feathers).
# Documentation
Please see the [documentation site](https://mostlyjs.github.io).
# Usage
## Installation
```bash
npm install mostly-feathers-rest
```## Quick Example
```javascript
const express = require('express');
const bodyParser = require('body-parser');
const nats = require('nats');
const mostly = require('mostly-node');
const feathers = require('mostly-feathers-rest');const trans = new mostly(nats.connect()
const app = express()
.use(bodyParser.json())
.use(bodyParser.urlencoded({ extended: true }));trans.ready(() => {
app.use(feathers(app, trans, '/api'));
app.listen(process.env.PORT || 3001);
});
```# License
MIT