Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dynamodb-admin

Package Overview
Dependencies
Maintainers
1
Versions
50
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 1.6.0 to 1.7.0

views/create-table.ejs

38

index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc