New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

radws

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

radws

Rapid application development without servers

latest
Source
npmnpm
Version
1.0.0-alpha.7
Version published
Maintainers
1
Created
Source

Radws

Rapid application development without servers

Getting Started

To use radws, install the node module:

npm install --save radws@latest

Create a radws app using the generators in generator-radws

Dev Server

You can use the dev server to test your routes and handlers locally before deploying to AWS.

npm run radws-dev-server

Then, connect to http://localhost:3000

And try the API explorer at http://localhost:3000/api_explorer

Document

const Document = require('radws/document');
const uuid = require('uuid/v4');

const Article = Document({
  region: 'us-east-1',
  accessKeyId: 'YOUR_ACCESS_KEY_ID',
  secretAccessKey: 'YOUR_SECRET_ACCESS_KEY',
  tableName: 'Articles',
  partitionKey: 'ID',
  partitionKeyGenerator: uuid,
  timestamps: true
});

Article.create({
  title: 'My first article',
  text: 'This is a pretty cool library'
})
.then(article => alert(`Successfully created article ${article.ID}`));

.all(filters)

.find(identifier)

.create(attributes)

.update(identifier, attributes)

.destroy(identifier)

Resource

const Resource = require('radws/resource');
const Article = require('./article');

// GET /articles/:id
exports.show = Resource.handler((request, render) => {
  return Article.find(request.params.id)
    .then(article => {
      render({ status: 200, body: { article }});
    });
});

.handler(callback)

FAQs

Package last updated on 24 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts