Skip to content

Commit

Permalink
added serverless deploy options
Browse files Browse the repository at this point in the history
  • Loading branch information
emaildano committed Feb 20, 2018
1 parent cb839bd commit 63f94dc
Show file tree
Hide file tree
Showing 14 changed files with 86 additions and 24 deletions.
25 changes: 5 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# package directories
node_modules
jspm_packages

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Serverless directories
.serverless
6 changes: 6 additions & 0 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"main.css": "static/css/main.33c75c77.css",
"main.css.map": "static/css/main.33c75c77.css.map",
"main.js": "static/js/main.839c5137.js",
"main.js.map": "static/js/main.839c5137.js.map"
}
Binary file added build/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>React App</title><link href="/static/css/main.33c75c77.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="/static/js/main.839c5137.js"></script></body></html>
15 changes: 15 additions & 0 deletions build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
1 change: 1 addition & 0 deletions build/service-worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions build/static/css/main.33c75c77.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/css/main.33c75c77.css.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions build/static/js/main.839c5137.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/js/main.839c5137.js.map

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions handler.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

module.exports.hello = (event, context, callback) => {
const response = {
statusCode: 200,
body: JSON.stringify({
message: 'Go Serverless v1.0! Your function executed successfully!',
input: event,
}),
};

callback(null, response);

// Use this code if you don't use the http event with the LAMBDA-PROXY integration
// callback(null, { message: 'Go Serverless v1.0! Your function executed successfully!', event });
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"react-bootstrap": "^0.32.1",
"react-dom": "^16.2.0",
"react-lorem-component": "^0.12.2",
"react-scripts": "1.1.1"
"react-scripts": "1.1.1",
"serverless-finch": "^1.4.0"
},
"scripts": {
"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/",
Expand Down
13 changes: 13 additions & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
service: aws-nodejs # NOTE: update this with your service name

provider:
name: aws
runtime: nodejs6.10

plugins:
- serverless-finch

custom:
client:
bucketName: shifter-style-guide
distributionFolder: build
15 changes: 12 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ block-stream@*:
dependencies:
inherits "~2.0.0"

bluebird@^3.4.7:
bluebird@^3.0.6, bluebird@^3.4.7:
version "3.5.1"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"

Expand Down Expand Up @@ -4109,7 +4109,7 @@ lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"

"lodash@>=3.5 <5", lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.3.0, lodash@~4.17.4:
"lodash@>=3.5 <5", lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.4:
version "4.17.5"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"

Expand Down Expand Up @@ -4277,7 +4277,7 @@ [email protected]:
version "1.4.1"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"

mime@^1.4.1, mime@^1.5.0:
mime@^1.2.11, mime@^1.4.1, mime@^1.5.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"

Expand Down Expand Up @@ -6005,6 +6005,15 @@ [email protected]:
parseurl "~1.3.2"
send "0.16.1"

serverless-finch@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/serverless-finch/-/serverless-finch-1.4.0.tgz#3a45f6b69739ca2888baab4d98c8cbd23502fbd4"
dependencies:
async "^1.5.2"
bluebird "^3.0.6"
lodash "^4.2.1"
mime "^1.2.11"

serviceworker-cache-polyfill@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/serviceworker-cache-polyfill/-/serviceworker-cache-polyfill-4.0.0.tgz#de19ee73bef21ab3c0740a37b33db62464babdeb"
Expand Down

0 comments on commit 63f94dc

Please sign in to comment.