storage-io-service

1.3.0 • Public • Published

Moleculer

storage-io-service

This is a Moleculer-based microservices project. Generated with the Moleculer CLI.

The storage-io-service provides a Restful API for performing File I/O operations. The service will use the storage-io library to perform the actual I/O operations using the implementation that is associated with the site ID of the requesting service. Settings for each site will be retrieved from the configuration profile associated with the site ID. This will allow some sites to store files locally and others to write to a cloud storage provider such as AWS.

Usage

Start the project with npm run command. After starting, open the http://localhost:3000/ URL in your browser. On the welcome page you can test the generated services via API Gateway and check the nodes & services.

In the terminal, try the following commands:

  • nodes - List all connected nodes.
  • actions - List all registered service actions.
  • call greeter.hello - Call the greeter.hello action.
  • call greeter.welcome --name John - Call the greeter.welcome action with the name parameter.

Services

  • api: API Gateway services
  • greeter: Sample service with hello and welcome actions.
  • storage.io: Main service which provides end points for file I/O operations.

Useful links

NPM scripts

  • npm run dev: Start development mode (load all services locally with hot-reload & REPL)
  • npm run start: Start production mode (set SERVICES env variable to load certain services)
  • npm run cli: Start a CLI and connect to production. Don't forget to set production namespace with --ns argument in script
  • npm run ci: Run continuous test mode with watching
  • npm test: Run tests & generate coverage report
  • npm run dc:up: Start the stack with Docker Compose
  • npm run dc:down: Stop the stack with Docker Compose

Package Sidebar

Install

npm i storage-io-service

Weekly Downloads

0

Version

1.3.0

License

none

Unpacked Size

245 kB

Total Files

25

Last publish

Collaborators

  • mgrishaber-merlin