GithubHelp home page GithubHelp logo

Comments (7)

austencollins avatar austencollins commented on June 22, 2024 1

@gsavvidis96 Yep, we felt the need for this too in after we POC'd the first version in our team. Now, here's what we are working on, please let us know what you think or if you have other suggestions:

  • Dev Mode should print the basic essential info upon start (domain, etc.)
  • Dev Mode should be an interactive terminal session, which still allows for input.
  • Dev Mode's terminal session input should allow for easy invoking of AWS Lambda and emulation of several types of event payloads, beyond just API requests—all in the CLI.

from serverless.

gsavvidis96 avatar gsavvidis96 commented on June 22, 2024 1

@gsavvidis96 Yep, we felt the need for this too in after we POC'd the first version in our team. Now, here's what we are working on, please let us know what you think or if you have other suggestions:

  • Dev Mode should print the basic essential info upon start (domain, etc.)
  • Dev Mode should be an interactive terminal session, which still allows for input.
  • Dev Mode's terminal session input should allow for easy invoking of AWS Lambda and emulation of several types of event payloads, beyond just API requests—all in the CLI.

I think it will be perfect that way, can't think of anything more currently.

from serverless.

austencollins avatar austencollins commented on June 22, 2024 1

@senghuotlay Multiple people should not run serverless dev at the same time in the same Stage, or the feature will only work for one of them, since the events can only be proxied to one user's machine at a time. To avoid this, teammates should use personal Stages, rather than work on a shared development Stage together. Or, if sharing the same development Stage, if logic is broken up across multiple Services, teammates can work on a Service individually in the same Stage. We realize this isn't ideal, but it's a limitation of cloud architecture generally. We have something in the works that will solve this problem perfectly, which we aim to unveil in Q3.

If the terminal session is closed and a deployment does not happen to restore the original environment using a regular serverless deploy, the AWS Lambda functions will still be instrumented with dev mode and will not work, since they will be reaching out to a local machine which is no longer connected. Always remember to run a regular deploy after dev mode.

This is only the first version of the feature and about ~10% of our vision here. We'll be shipping a lot more in this direction shortly. Keep the feedback coming!

from serverless.

senghuotlay avatar senghuotlay commented on June 22, 2024

it will go against your deployment's endpoint, acting as a barier, therefore i think it's suggested to have a local env deployment against that

from serverless.

gsavvidis96 avatar gsavvidis96 commented on June 22, 2024

Sorry I did not understand what you mean. What I mean is that I run serverless dev and I just see Connected (Ctrl+C to cancel) so in order to invoke a function for example in postman I need to know its endpoint. To find that I got to run a second command in another terminal serverless info and copy and paste the endpoint from there while it could just be

service: XX
stage: XX
region: XX
stack XX
endpoint: GET - https://XXX
functions:
  XXX: XX-dev-XX
  
Connected (Ctrl+C to cancel)

After invoking the serverless dev command

from serverless.

senghuotlay avatar senghuotlay commented on June 22, 2024

couple of questions to have @ac360, what will happen when multiple people are running serverless dev at the same time, how will will u be able to intercept which one, and after you've closed your terminal, will it crashes the serer?

from serverless.

austencollins avatar austencollins commented on June 22, 2024

We're still working on lots of improvements here, but until then, we've pushed the initial suggestion to show endpoints (and functions) at the beginning of Dev Mode. Run serverless update to get it.

https://github.com/serverless/serverless/releases/tag/v4.0.33

from serverless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.