Socket
Socket
Sign inDemoInstall

@eahefnawy/client

Package Overview
Dependencies
4
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @eahefnawy/client

The Serverless Client.


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
452 kB
Created
Weekly downloads
 

Readme

Source

backend.js is a super light module that lets you imports your λ functions into the browser as a backend library.

Usage

Important Note: To keep your AWS account secure, make sure you pass access keys with limited access to only invoke the functions you want to invoke.

React
npm i --save @eahefnawy/backend.js
import backend from '@eahefnawy/backend.js'

const config = {
  import: ['sendSms', 'sendEmail'], // λ function names that you'd like to import
  region: 'us-east-1',
  accessKeyId: 'xxx',
  secretAccessKey: 'xxx'
}

const { sendSms, sendEmail } = backend(config)

await sendSms({ some: 'inputs' })
await sendEmail({ some: 'inputs' })
HTML
<script crossorigin src="https://unpkg.com/@eahefnawy/backend.js/dist/backend.umd.min.js"></script>

<script>
  const config = {
    import: ['sendSms', 'sendEmail'], // λ function names that you'd like to import
    region: 'us-east-1',
    accessKeyId: 'xxx',
    secretAccessKey: 'xxx'
  }

  const { sendSms, sendEmail } = backend(config)

  sendSms({ some: 'inputs' })
  sendEmail({ some: 'inputs' })
</script>

FAQs

Last updated on 16 Aug 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc