
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
@barstoolsports/serverless-micro
Advanced tools
this is the serverless plugin to help manage multiple micro services under one main service.
Serverless framework plugin to help manage multiple micro services under one main service.
A limit of Cloudformation is it can only hold 200 objects. This becomes problematic when you are dealing with even a medium sized API and the Serverless framework. This plugin aims to split up the methods outlined in the main Serverless file, to multiple services, and give you the flexibility to deploy those services individually.
This plugin does not setup a main API Gateway file for you, although it is a major priority. Currently, this still has to be managed using AWS and API Gateway.
To get this plugin working properly, you have to setup your folder structure in a specific way. Again the goal is to make this more universal so it doesn't matter what folder structure you have setup, but with dependencies be included in the handler files and mixing placement of lambdas, this get's very tricky.
my_project:
serverless.yml
node_modules
lib
tests
handlers
service_1.js
service_2.js
service_3.js
This is something we are focused on making improving, however, separating out the logic this way has worked really well, and enables a really good process.
Install the plugin from npm
$ npm install --save-dev serverless-micro
Add the plugin to your serverless.yml
# serverless.yml
plugins:
- serverless-micro
Using the folder structure above, you then add the service name to each of your methods and separate them out.
# serverless.yml
functions:
# Stories
fetchStories:
handler: "handlers/service_1.serviceOneMethod"
events:
- http:
path: /serviceOne
method: get
service: service_1
# Podcasts
fetchPodcasts:
handler: "handlers/service_2.serviceTwoMethod"
events:
- http:
path: /serviceTwo
method: get
service: service_2
# Videos
fetchVideos:
handler: "handlers/service_3.serviceThreeMethod"
events:
- http:
path: /serviceThree
method: get
service: service_3
Once services are setup deploy using new hook.
$ sls deploy micro --service stories
$ sls deploy micro --service stories --stage prod
$ sls deploy micro --service stories --stage prod --function fetchStories
We welcome pull requests! Please fork the repo and submit your PR. https://github.com/BarstoolSports/serverless-micro
FAQs
this is the serverless plugin to help manage multiple micro services under one main service.
The npm package @barstoolsports/serverless-micro receives a total of 0 weekly downloads. As such, @barstoolsports/serverless-micro popularity was classified as not popular.
We found that @barstoolsports/serverless-micro demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.