Search code examples
node.jsvisual-studio-codeportserverlessserverless-framework-offline

How to debug Serverless Offline in Visual Studio Code using another port?


I have two Serverless Offline "servers" which I need to run locally at same time.

So I need to change the port of one of the servers.

I run a server using Visual Studio Code debugger. The configs of the servers are in launch.json files.

How can I change the port of a Serverless Offline application so that I can run it in parallel with another Serverless Offline application using VS Code debugger?


Solution

  • Solved by adding the following lines to the serverless.yml file:

    custom:
        serverless-offline:   ## add this two lines
            port: 4000        ## bellow "custom:" line