Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating a new lambda function with given example give me error #1

Open
snehav27 opened this issue Feb 2, 2017 · 0 comments
Open

Comments

@snehav27
Copy link

snehav27 commented Feb 2, 2017

Running the code given in the example gives me following error:

START RequestId: Version: $LATEST
2017-02-02T14:44:50.818Z	undefined	Server has started
2017-02-02T14:44:50.954Z	2691b0b8-e956-11e6-b670-3b17248e661b	Error: SecurityError: Request method not allowed
    at openOnSocket (/var/task/node_modules/xmlhttprequest-socket/lib/XMLHttpRequest.js:191:13)
    at eventHandler.sendRequest (/**var/task/node_modules/lampress/index.js:64:11**)
    at eventHandler.handle (/var/task/node_modules/lampress/index.js:23:10)
    at /var/task/node_modules/lampress/index.js:87:13
END RequestId: 2691b0b8-e956-11e6-b670-3b17248e661b
REPORT RequestId: 2691b0b8-e956-11e6-b670-3b17248e661b	Duration: 199.82 ms	Billed Duration: 200 ms 	Memory Size: 128 MB	Max Memory Used: 24 MB	
 Process exited before completing request

Is it something do with the port?

Followed documentation: https://www.npmjs.com/package/lampress
image

package.json:
"lampress": "^1.1.1"

Code:

var port = process.env.PORT || 5000;
app.listen(port, function() {
  console.log("Server has started");
});

exports.handler = lampress(port, server);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant