Create applications in a microservice architecture with FeathersJS framework and serverless.
The idea of this library is to offer some basic helpers for constructing microservice architectures with feathersJS and serverless frameworks.
The main entry point for the api will be a normal FeathersApp that will be our gateway. In this app you will register your MicroService Services that will proxy requests to each specific serverless application.
The main idea is to create applications as a mono-repository so we can share types between them, so you can have your services in the gateway application with the correct typing.
Websockets are not supported by this library, as serverless functions are not are not active servers they do not offer socket connectivity. Although it is possible to create an event bridge to handle events between the applications.
There are 2 libraries to be used, each with it's own detailed documentation:
- @feathers-micro/microservice - Register the serverless services in your gateway application.
- @feathers-micro/serverless - Helps implementing your feathers serverless micro service applications.
You can check an example of implementation in the apps of the repository.
To run the example:
# install the dependencies
yarn
# bootstrap internal libraries
yarn bootstrap
# run the 3 applications at the same time
yarn dev
This repository was created for a personal project and more as an example of architecture, so if you want to used it do at your own risk.
For more cloud friendly micro service architecture with the FeatherJS framework check feathers-distributed.