Rearrange into two servers:api and web
This commit is contained in:
6
web/.gitignore
vendored
Normal file
6
web/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# package directories
|
||||
node_modules
|
||||
jspm_packages
|
||||
|
||||
# Serverless directories
|
||||
.serverless
|
||||
18
web/handler.js
Normal file
18
web/handler.js
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
module.exports.hello = async event => {
|
||||
return {
|
||||
statusCode: 200,
|
||||
body: JSON.stringify(
|
||||
{
|
||||
message: 'Go Serverless v1.0! Your function executed successfully!',
|
||||
input: event,
|
||||
},
|
||||
null,
|
||||
2
|
||||
),
|
||||
};
|
||||
|
||||
// Use this code if you don't use the http event with the LAMBDA-PROXY integration
|
||||
// return { message: 'Go Serverless v1.0! Your function executed successfully!', event };
|
||||
};
|
||||
9
web/serverless.yml
Normal file
9
web/serverless.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
service: lunchrunweb
|
||||
|
||||
provider:
|
||||
name: aws
|
||||
runtime: nodejs12.x
|
||||
|
||||
functions:
|
||||
hello:
|
||||
handler: handler.hello
|
||||
Reference in New Issue
Block a user