Skip to content

Commit

Permalink
add webpack config sls handler and dynamoose
Browse files Browse the repository at this point in the history
- changed serverless handler 
- fix webpack config for serverless offline testing
- maked item route with GET method where make a query in a dynamodb table
  • Loading branch information
bardarz committed Nov 6, 2019
1 parent a6c7b21 commit 57e4c7b
Show file tree
Hide file tree
Showing 12 changed files with 3,484 additions and 194 deletions.
14 changes: 12 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"plugins": ["@babel/plugin-transform-runtime"],
"presets": ["@babel/preset-env"]
"plugins": ["source-map-support","@babel/plugin-syntax-dynamic-import"],
"presets": [
[
"@babel/preset-env",
{
"modules":"commonjs",
"targets": {
"node": "8.10"
}
}
]
]
}
11 changes: 5 additions & 6 deletions handler.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

const serverless = require('serverless-http');
const app = require('./src/app');

module.exports.main = serverless(app);


'use strict';
const awsless = require('aws-serverless-express');

const app = require('./src/app');
const server = awsless.createServer(app);

exports.main = (event, context) => { awsless.proxy(server, event, context) };
Loading

0 comments on commit 57e4c7b

Please sign in to comment.