Rearrange into two servers:api and web

This commit is contained in:
benjaminramey
2019-11-21 11:58:28 -06:00
parent d5aa1e9245
commit 66bca2546c
7 changed files with 46 additions and 117 deletions

6
api/.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
# package directories
node_modules
jspm_packages
# Serverless directories
.serverless

18
api/handler.js Normal file
View 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 };
};

13
api/serverless.yml Normal file
View File

@@ -0,0 +1,13 @@
service: lunchrunapi
provider:
name: aws
runtime: nodejs12.x
functions:
hello:
handler: handler.hello
events:
- http:
path: hello
method: post