Skip to content
Permalink
Browse files

Add netlify lambda framework

  • Loading branch information...
tjvick committed Nov 4, 2018
1 parent 61895b7 commit 8da5425ee16eed60f97c8fdece6e5bb2c484d724
Showing with 15,359 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +27 −0 app/lambda/runGame.js
  3. +2 −0 app/netlify.toml
  4. +15,323 −0 app/package-lock.json
  5. +6 −1 app/package.json
@@ -0,0 +1 @@
_functions
@@ -0,0 +1,27 @@
function runGame(event, context, callback) {
const headers = {
'Access-Control-Allow-Origin': '*',
};

const okay = true;
const response = {
'message': 'Successful lambda test!'
}

if (okay) {
callback(null,
{
statusCode: 200,
headers,
body: JSON.stringify(response),
})
} else {
callback(new Error('Failed lambda test'), {
statusCode: 500,
headers,
body: 'not sure if this does anything',
})
}
}

exports.handler = runGame;
@@ -0,0 +1,2 @@
[build]
functions = "../_functions"
Oops, something went wrong.

0 comments on commit 8da5425

Please sign in to comment.
You can’t perform that action at this time.