Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@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.
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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.