🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

dynamodb-admin

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamodb-admin - npm Package Compare versions

Comparing version

to
1.7.0

views/create-table.ejs

@@ -11,2 +11,7 @@ const express = require('express')

if (process.env.NODE_ENV === 'production') {
console.error('\x1b[31mDo not run this in production!') // red
process.exit(1)
}
const app = express()

@@ -54,2 +59,35 @@ app.set('json spaces', 2)

app.get('/create-table', (req, res) => {
res.render('create-table', {})
})
app.post('/create-table', bodyParser.urlencoded({extended: false}), (req, res, next) => {
dynamodb.createTable({
TableName: req.body.TableName,
ProvisionedThroughput: {
ReadCapacityUnits: req.body.ReadCapacityUnits,
WriteCapacityUnits: req.body.WriteCapacityUnits
},
KeySchema: [{
AttributeName: 'id',
KeyType: 'HASH'
}],
AttributeDefinitions: [{
AttributeName: 'id',
AttributeType: 'S'
}]
}).promise().then((response) => {
res.redirect('/')
}).catch(next)
})
app.delete('/tables/:TableName', (req, res, next) => {
const TableName = req.params.TableName
dynamodb.deleteTable({TableName}).promise()
.then(() => {
res.status(204).end()
})
.catch(next)
})
app.get('/tables/:TableName', (req, res, next) => {

@@ -56,0 +94,0 @@ const TableName = req.params.TableName

2

package.json
{
"name": "dynamodb-admin",
"version": "1.6.0",
"version": "1.7.0",
"description": "GUI for DynamoDB. Useful for local development.",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet