Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.
/ nest-serverless Public archive

NestJS + serverless framework + AWS lambda function

Notifications You must be signed in to change notification settings

hakimio/nest-serverless

Repository files navigation

Simple NestJS Serverless example

Very simple serverless "Hello world" type example using NestJS, Serverless framework and AWS lambda function

Installation

yarn install

Running the app

Default Nest server in watch mode:

yarn run start:dev

If all goes well the app should be available on 3000 port:

http://localhost:3000

Serverless offline plugin:

yarn run start:sls

Testing the app with serverless invoke local:

yarn run test:sls

Packaging and deploying the app:

yarn run deploy

Only package:

yarn run package

Changed files

  • app.ts
  • main.ts
  • lambda.ts

Swagger

When running the app locally, swagger documentation is available under /docs path:

http://localhost:3000/docs