This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const path = require("path"); | |
const PORT = process.env.PORT || 5000; | |
const app = express(); | |
const router = express.Router(); | |
// this middleware function must come before | |
// express.static middleware | |
router.use("/", (req, res, next) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
const ddb = new AWS.DynamoDB.DocumentClient(); | |
exports.handler = (event, context, callback) => { | |
const params = { | |
TableName: "TABLE_NAME_HERE", | |
Key: { | |
"KEY_NAME_HERE": "KEY_VALUE_HERE" | |
} | |
} |