Skip to content

Commit de4794f

Browse files
author
Patrick Brandt
committed
init commit
0 parents  commit de4794f

File tree

6 files changed

+113
-0
lines changed

6 files changed

+113
-0
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*.{yml,yaml,json}]
2+
indent_style = space
3+
indent_size = 2
4+
5+
[*.js]
6+
indent_style = space
7+
indent_size = 4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
node_modules
3+
.serverless
4+
npm-debug.log

.jshintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//https://github.com/jshint/jshint/blob/master/examples/.jshintrc
2+
{
3+
"node" : true,
4+
"mocha" : true,
5+
"esversion" : 6
6+
}

event.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"key3": "value3",
3+
"key2": "value2",
4+
"key1": "value1"
5+
}

handler.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'use strict';
2+
3+
// Your first function handler
4+
module.exports.hello = (event, context, cb) => {
5+
const body = {
6+
message: 'Go Serverless v1.0! Your function executed successfully!',
7+
input: event,
8+
};
9+
10+
const response = {
11+
statusCode: 200,
12+
headers: {
13+
'custom-header': 'Custom header value',
14+
},
15+
body: JSON.stringify(body),
16+
};
17+
18+
cb(null, response);
19+
};
20+
21+
// You can add more handlers here, and reference them in serverless.yml

serverless.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Welcome to Serverless!
2+
#
3+
# This file is the main config file for your service.
4+
# It's very minimal at this point and uses default values.
5+
# You can always add more config options for more control.
6+
# We've included some commented out config examples here.
7+
# Just uncomment any of them to get that config option.
8+
#
9+
# For full config options, check the docs:
10+
# docs.serverless.com
11+
#
12+
# Happy Coding!
13+
14+
service: my-idp # NOTE: update this with your service name
15+
16+
provider:
17+
name: aws
18+
runtime: nodejs4.3
19+
20+
# you can overwrite defaults here
21+
# stage: dev
22+
# region: us-east-1
23+
24+
# you can add statements to the Lambda function's IAM Role here
25+
# iamRoleStatements:
26+
# - Effect: "Allow"
27+
# Action:
28+
# - "s3:ListBucket"
29+
# Resource: { "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "ServerlessDeploymentBucket" } ] ] }
30+
# - Effect: "Allow"
31+
# Action:
32+
# - "s3:PutObject"
33+
# Resource:
34+
# Fn::Join:
35+
# - ""
36+
# - - "arn:aws:s3:::"
37+
# - "Ref" : "ServerlessDeploymentBucket"
38+
39+
# you can add packaging information here
40+
#package:
41+
# include:
42+
# - include-me.js
43+
# exclude:
44+
# - exclude-me.js
45+
# artifact: my-service-code.zip
46+
47+
functions:
48+
hello:
49+
handler: handler.hello
50+
51+
# you can add any of the following events
52+
# events:
53+
# - http:
54+
# path: users/create
55+
# method: get
56+
# - s3: ${env:BUCKET}
57+
# - schedule: rate(10 minutes)
58+
# - sns: greeter-topic
59+
60+
# you can add CloudFormation resource templates here
61+
#resources:
62+
# Resources:
63+
# NewResource:
64+
# Type: AWS::S3::Bucket
65+
# Properties:
66+
# BucketName: my-new-bucket
67+
# Outputs:
68+
# NewOutput:
69+
# Description: "Description for the output"
70+
# Value: "Some output value"

0 commit comments

Comments
 (0)