Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mtoscan/generate-update-statement-typescript

Repository files navigation

Serverless Node.js generateUpdateStatement in TypeScript

For this take home project I used a different node starter. This uses Serverless, node.js and TypeScript. I choose this starter to show how we can implement Typescript and OOP in a lambda function with serverless. This API could be deployed in AWS with a proper configuration and used as a service.

Requirements

Installation

To create a new Serverless project.

$ serverless install --url https://github.com/mtoscan/generate-update-statement-typescript --name my-project

Enter the new directory

$ cd my-project

Install the Node.js packages

$ npm install

Usage

To run a function on your local

$ serverless invoke local --function hello

To simulate API Gateway locally using serverless-offline

$ serverless offline start

Running Tests

Run tests using

$ npm test

I'm using Jest to run the tests. You can read more about setting up tests here.

List of changes or Improvements pending

  • Improve type definitions to avoid use of any.
  • More unit test cases
  • Add environment variables
  • Config serverless to deploy to AWS

Postman File

You can import the file Backend_Take_Home.postman_collection.json in your postman app. You will find a collection of post request using the same data used in the test cases. Is required to simulate the API Gateway locally with serverless offline.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors