isitgeorge / serverless-offline-multi Goto Github PK
View Code? Open in Web Editor NEWA wrapper for serverless-offline that allows multiple instances to be ran concurrently with watch functionality.
License: MIT License
A wrapper for serverless-offline that allows multiple instances to be ran concurrently with watch functionality.
License: MIT License
I would like to start multiple services as if I'm running serverless offline start -s prod
is there a way to call this wrapper passing those options? Thanks.
Hi, how are you?
When I try to run with my services I get this output:
Unexpected error while starting serverless-offline lambda server on port 3002: { Error: listen EADDRINUSE: address already in use 127.0.0.1:3002
at Server.setupListenHandle [as _listen2] (net.js:1270:14)
at listenInCluster (net.js:1318:12)
at GetAddrInfoReqWrap.doListen (net.js:1451:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:61:10)
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '127.0.0.1',
port: 3002 }
How can I solve this?
Thank you.
Since its last overhaul a small issue with the stage parameter is blocking a new release to npm. I'm not currently actively working with serverless so I can't dedicated the time to fix right now.
For example starting three services:
Using command: --directory service-account --port 3000 --watch true --stage prod --directory service-form --port 3001 --watch true --stage prod --directory service-mailing --port 3002 --watch true --stage prod
Results in the stage array being consumed as an array, but should be split up into each separate command.
││ POST | http://localhost:3001/prod,prod,prod/createForm ││ POST |
Creating this issue if I have time in the future, or if anybody would like to fix it then feel free.
is there a way to start all my services in just one common port?
Thanks.
There were the logs from my terminal when I tried running it for the first time:
[store] [nodemon] starting `serverless offline --port 3001 --httpPort 3001 --lambdaPort 4001`
[user] [nodemon] 2.0.3
[user] [nodemon] to restart at any time, enter `rs`
[user] [nodemon] watching path(s): *.*
[user] [nodemon] watching extensions: js,yml
[user] [nodemon] starting `serverless offline --port 3002 --httpPort 3002 --lambdaPort 4002`
[user] DOTENV: Loading environment variables from .env, .env.local:
[user] *** env vars
[user] Environment: darwin, node 18.18.2, framework 3.30.1 (local), plugin 6.2.3, SDK 4.3.2
[user] Docs: docs.serverless.com
[user] Support: forum.serverless.com
[user] Bugs: github.com/serverless/serverless/issues
[user]
[user] Error:
[user] Detected unrecognized CLI options: "--port".
[user]
In this project, I am using serverless ^3.18.1
and serverless-offline ^8.8.0
. According to serverless-offline docs, the option --port
does not exist indeed (see it here. I believe this option shall be removed.
Does this work on Windows? Mine just launches Visual Studio when executing the multi command.
A complete list of concurrently
supported colours should be added to the prefixColours export https://github.com/isitgeorge/serverless-offline-multi/blob/master/lib/helpers.js#L51
Sometimes globally installing a module isn't possible, so being able to install as a dependency would be a better idea. However this currently suffers with relative path issues
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.