JSPM

  • Created
  • Published
  • Downloads 67854
  • Score
    100M100P100Q127708F
  • License ISC

Package Exports

  • api

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

api

The easiest way ever to create an awesome API... no, really. It's as simple as:

$ npm install api -g
$ api init
[ Edit files]
$ api deploy

There's a bunch of stuff below, but seriously... just run those commands above, and see how simple it is!

Usage (CLI)

With npm:

npm install api -g

With yarn:

yarn global add api

This gives you the api command line program

# Displays usage information
api

# In a fresh directory
api init

Usage (node module)

With npm:

npm install api --save

With yarn:

yarn add api
const api = require('api');

api.create(name, function)

  • name is the name of the of the action
  • function is the code to invoke when this action is run

function is invoked with (data, api)

  • data is an object containing parameters passed to your actions
  • api is an object containing error and success methods to call on completion

Credits

Dom Harrington

Marc Cuva