https://github.com/johnayoung/feathers-cloudinary
A Feathers service for Cloudinary
https://github.com/johnayoung/feathers-cloudinary
Last synced: 5 months ago
JSON representation
A Feathers service for Cloudinary
- Host: GitHub
- URL: https://github.com/johnayoung/feathers-cloudinary
- Owner: johnayoung
- License: mit
- Created: 2019-11-20T15:07:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T17:40:46.000Z (about 2 years ago)
- Last Synced: 2024-05-18T21:55:02.297Z (11 months ago)
- Language: JavaScript
- Size: 306 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/contributing.md
- License: LICENSE
Awesome Lists containing this project
- awesome-feathersjs - feathers-cloudinary - Utilize the [Cloudinary](https://cloudinary.com/documentation) API for image manipulation/parsing/uploading/editing. (Plugins / Images)
README
# feathers-cloudinary
[](https://travis-ci.org/feathersjs/plugins)
[](https://www.npmjs.com/package/feathers-cloudinary)> **Unofficial** Feathers plugin service for Cloudinary
## Installation
```
npm install feathers-cloudinary --save
```## Documentation
TBD
## Complete Example
Here's an example of a Feathers server that uses `cloudinary`.
```js
const feathers = require("@feathersjs/feathers");// Initialize the application
const app = feathers();
```in `upload.class.js`:
```js
/* eslint-disable no-unused-vars */
const { Upload } = require('feathers-cloudinary');exports.Upload = Upload;
```in `upload.service.js`:
```js
// Initializes the `upload` service on path `/upload`
const { Upload } = require('./upload.class');
const hooks = require('./upload.hooks');module.exports = function(app) {
const options = {
paginate: app.get('paginate'),
cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
api_key: process.env.CLOUDINARY_API_KEY,
api_secret: process.env.CLOUDINARY_API_SECRET,
};// Initialize our service with any options it requires
app.use('/upload', new Upload(options, app));// Get our initialized service so that we can register hooks
const service = app.service('upload');service.hooks(hooks);
};
```## Contributing
Run `npm run release:`
## License
Copyright (c) 2018
Licensed under the [MIT license](LICENSE).