Git Product home page Git Product logo

aws-lambda-express-skeleton-node's Introduction

Aws Node Lambda Serverless Skeleton

Boilerplate to build simple lambda functions with RESTful API

Purpose

This project can be used for everyone to create lambda functions containing APIs with RESTful. It are build with aws-express.

Last updates

In this section contains the release notes of the project.

Version 0.0.1

Initial version of the project

All the changes must be tracked in CHANGELOG.md

Prerequisites

  • node: 6.10+
  • aws-sdk
  • aws-serverless-express
  • node-cache
  • uuid

development

  • nodemon
  • jest

Features

  • Provides an structure for lambda function environment.

Installation

The first step is the installation of Node.js, even though it is not installed. The installation is done using the command npm

npm install 

The Development dependencies can be installed by this command:

npm install --only=dev

Getting started

Running locally for testing and development

This application are build for Aws Lambda functions, but to run locally this application uses the express module. To run the application locally you need execute the follow command:

node server.js 

Or via npm:

npm server

Running tests

To run the unit tests of the project you can execute the follow command:

npm test

Usage

Open the browser of your preference and go to localhost:3000.

After change the url to:

Response:

{
    "result": true,
    "message": "Person list success",
    "data": [
        {
            "uuid": "1da3c840-d688-11e9-a1e2-ff2b6767f962",
            "firstName": "João",
            "lastName": "Silva",
            "email": "[email protected]",
            "photo": "",
            "deleted": "0",
            "active": "1",
            "createdAt": "2019-09-14T00:39:31.268Z",
            "updatedAt": null,
            "deletedAt": null
        },
        {
            "uuid": "1da41660-d688-11e9-a1e2-ff2b6767f962",
            "firstName": "Maria",
            "lastName": "Silva",
            "email": "[email protected]",
            "photo": "",
            "deleted": "0",
            "active": "1",
            "createdAt": "2019-09-14T00:39:31.270Z",
            "updatedAt": null,
            "deletedAt": null
        }
    ]
}

There is an example of an API response using a cache memory only for this demonstration, you can apply an dynamoDB or other DB of you preference.

License

Code released under the LICENSE

Contributors

Contributions

Pull requests and new issues are welcome. See CONTRIBUTING.md for details.

aws-lambda-express-skeleton-node's People

Contributors

andersoncontreira avatar dependabot[bot] avatar

Watchers

 avatar  avatar

Forkers

prafed egocks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.