Serverless-Moleculer
Serverless Framework & Moleculer !
Note : available for the impatients 😄 ! I'll add a better documentation and a start kit for beginner (with serverless-fuck-you-4kb too).
Install
You already know it : npm install --save serverless-moleculer
How to use it
On your serverless.yml
file, create a new function :
HelloWorld: name: "serverless-moleculer-hello-world" handler: handler.HelloWorld memorySize: 256 timeout: 30 events: - http: path: / method: any cors: origin: '*' headers: - Content-Type - X-Amz-Date - Authorization - X-Api-Key - X-Amz-Security-Token - X-Amz-User-Agent allowCredentials: false
On your function handler.js
that contain your basic lambda handler, replace everything with :
const Moleculer = ; moduleexports =