Nicola Peduzzi
8 years ago
16 changed files with 72 additions and 6 deletions
@ -1,3 +0,0 @@ |
|||
export const hello = (event, context, cb) => cb(null, |
|||
{ message: 'Go Serverless Webpack v1.0! Your function executed successfully!', event } |
|||
); |
@ -0,0 +1,3 @@ |
|||
export const hello = (event, context, cb) => cb(null, |
|||
{ message: 'Go Serverless Webpack (Babel) v1.0! Your function executed successfully!', event } |
|||
); |
@ -0,0 +1,5 @@ |
|||
{ |
|||
"key3": "value3", |
|||
"key2": "value2", |
|||
"key1": "value1" |
|||
} |
@ -0,0 +1,3 @@ |
|||
export const hello = (event, context, cb) => cb(null, |
|||
{ message: 'Go Serverless Webpack (Typescript) v1.0! Your function executed successfully!', event } |
|||
); |
@ -0,0 +1,17 @@ |
|||
{ |
|||
"name": "serverless-webpack-typescript-example", |
|||
"version": "1.0.0", |
|||
"description": "Serverless webpack example using Typescript", |
|||
"main": "handler.js", |
|||
"scripts": { |
|||
"test": "echo \"Error: no test specified\" && exit 1" |
|||
}, |
|||
"author": "Nicola Peduzzi <thenikso@gmail.com> (http://nikso.net)", |
|||
"license": "MIT", |
|||
"devDependencies": { |
|||
"serverless-webpack": "^1.0.0-beta.2", |
|||
"ts-loader": "^0.8.2", |
|||
"typescript": "^1.8.10", |
|||
"webpack": "^1.13.1" |
|||
} |
|||
} |
@ -0,0 +1,15 @@ |
|||
# This is the Serverless Environment File |
|||
# |
|||
# It contains listing of your stages and their regions |
|||
# It also manages serverless variables at 3 levels: |
|||
# - common variables: variables that apply to all stages/regions |
|||
# - stage variables: variables that apply to a specific stage |
|||
# - region variables: variables that apply to a specific region |
|||
|
|||
vars: |
|||
stages: |
|||
dev: |
|||
vars: |
|||
regions: |
|||
us-east-1: |
|||
vars: |
@ -0,0 +1,13 @@ |
|||
service: serverless-webpack-typescript-example |
|||
|
|||
# Add the serverless-webpack plugin |
|||
plugins: |
|||
- serverless-webpack |
|||
|
|||
provider: |
|||
name: aws |
|||
runtime: nodejs4.3 |
|||
|
|||
functions: |
|||
hello: |
|||
handler: handler.hello |
@ -0,0 +1,13 @@ |
|||
module.exports = { |
|||
entry: './handler.ts', |
|||
output: { |
|||
libraryTarget: 'commonjs', |
|||
path: './.webpack', |
|||
filename: 'handler.js' |
|||
}, |
|||
module: { |
|||
loaders: [ |
|||
{ test: /\.ts(x?)$/, loader: 'ts-loader' } |
|||
] |
|||
} |
|||
}; |
Loading…
Reference in new issue