Skip to content

NestJS + serverless framework + AWS lambda function

Notifications You must be signed in to change notification settings

el2ro/nest-serverless

This branch is 3 commits ahead of ChrisTowles/nest-serverless:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7950970 · Jun 23, 2020

History

12 Commits
Sep 6, 2019
Jun 23, 2020
May 2, 2020
Sep 6, 2019
Sep 6, 2019
Sep 6, 2019
Jun 23, 2020
Sep 6, 2019
Jun 23, 2020
Jun 23, 2020
Jun 23, 2020
Sep 6, 2019
Jun 23, 2020
Sep 6, 2019
Apr 16, 2020

Repository files navigation

AWS-Lambda-fastify & NestJS Serverless example

This is used to show problem with Websocket Api communication

Installation

npm install

Build & Running the app

npm build

Launch the serverless offline

npm run start:sls

If all goes well the API Endpoint should be available on 3000 port and WS should be available on port 3001

http://localhost:3000 ws://localhost:3001

To test those

curl http://localhost:3000/dev/fastify or curl http://localhost:3000/dev/serverless

To Test WS endpoint use

npm install -g wscat

wscat -c ws://localhost:3001

To change between aws-lambda-fastify and serverless-fastify

Comment out the right handler from the serverless.yml file

    ws:
        # To test other
        # handler: src/aws-lambda-fastify.handler
        handler: src/serverless-fastify.handler

About

NestJS + serverless framework + AWS lambda function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%