Code Monkey home page Code Monkey logo

lambda-restify's People

Contributors

kksharma1618 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lambda-restify's Issues

statusCode must be a positive int

When used with AWS SAM $> sam local start-api command to run as a local lambda, fronted by its mock AWS API Gateway; and upon a curl call $> curl -X POST http://localhost:port/theapi ... I received an {"message":"Internal server error"} response as the curl response. Server-side, it logged the following:

2018-08-10 16:48:18 statusCode must be a positive int
2018-08-10 16:48:18 Function returned an invalid response (must include one of: body, headers or statusCode in the response object). Response received: {"statusCode":"200","body":"{\"Errors\":[{\"Expectation\":\"Required\", ...redacted}]}","headers":{"server":"","content-type":"application/json","date":"Fri, 10 Aug 2018 16:48:17 GMT","content-length":152}}
2018-08-10 16:48:18 127.0.0.1 - - [10/Aug/2018 16:48:18] "POST /theapi HTTP/1.1" 502 -

How could I change or override the response before its sent out so from {"statusCode":"200"...} to {"statusCode": 200...}?
Not sure if this is a real bug or a user-error (me).

Thanks.

TypeError: Server is not a constructor",

Hi, I followed the steps of the documentation but I get the following error:

{
  "errorMessage": "Error while loading users",
  "errorType": "TypeError",
  "stackTrace": [
    "TypeError: Server is not a constructor"
   .....
   ....
   ...
}

Thanks!

Not an issue, I couldn't find your contact info, so just saying thank you for this awesome project! Once I figured out how to get API Gateway Proxy resource setup, she works great man.

who-is-awesome

The example does not work

Hi,
As suggested, I'm using Node.js version is 6.10.2.

The following code

'use strict';

const Server = require('lambda-restify');
const server = new Server();

throws an error:

TypeError: Server is not a constructor

What should we do make this work?

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.