How to Use Serverless with NestJS

kop7 profile image mkop Updated on ・1 min read

Alt Text

Need an example of how to get started with NestJS and Serverless framework?

NestJS is a back-end framework for creating scalable applications.

Getting Started


To start playing with NestJS you should have node (version >= 8.9.0) and npm installed. You can download and install Node from the official website.

Create a database automatically

docker run --name mysql57 -p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=superpassword \
-e MYSQL_USER=user \
-d mysql/mysql-server:5.7

Serverless framework

For serverless you need to install the required package globally:

npm install serverless -g

To follow this tutorial, you are going to need clone repository NestJS-Serverless-TypeOrm

Now just start application:

npm run sls:offline

Let's create the first author in the application

You can try crud operations on Author

That's it!

Feel free to ask questions, make comments or suggestions, or just say hello in the comments below.

Posted on by:

kop7 profile



Software Developer


markdown guide