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

@serverless/platform-client

Package Overview
Dependencies
Maintainers
4
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serverless/platform-client

  • 0.0.3
  • npm
  • Socket score

Version published
Weekly downloads
965K
increased by3.64%
Maintainers
4
Weekly downloads
 
Created

What is @serverless/platform-client?

@serverless/platform-client is an npm package that provides a client for interacting with the Serverless Platform. It allows users to manage and deploy serverless applications, interact with the Serverless Framework Dashboard, and access various services provided by the Serverless Platform.

What are @serverless/platform-client's main functionalities?

Initialize the client

This code initializes the Serverless SDK client, which is the starting point for interacting with the Serverless Platform.

const { ServerlessSDK } = require('@serverless/platform-client');
const sdk = new ServerlessSDK();

Login to the Serverless Platform

This code demonstrates how to log in to the Serverless Platform using the SDK. This is necessary for performing authenticated operations.

const { ServerlessSDK } = require('@serverless/platform-client');
const sdk = new ServerlessSDK();
(async () => {
  await sdk.login();
})();

Deploy a service

This code demonstrates how to deploy a service to the Serverless Platform. It requires the user to be logged in and provides details about the organization, application, service, and stage.

const { ServerlessSDK } = require('@serverless/platform-client');
const sdk = new ServerlessSDK();
(async () => {
  await sdk.login();
  const result = await sdk.deploy({
    orgName: 'your-org',
    appName: 'your-app',
    serviceName: 'your-service',
    stageName: 'dev',
    inputs: {}
  });
  console.log(result);
})();

List services

This code demonstrates how to list all services within a specific organization. It requires the user to be logged in and provides the organization name.

const { ServerlessSDK } = require('@serverless/platform-client');
const sdk = new ServerlessSDK();
(async () => {
  await sdk.login();
  const services = await sdk.listServices({ orgName: 'your-org' });
  console.log(services);
})();

Other packages similar to @serverless/platform-client

FAQs

Package last updated on 24 Jan 2020

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

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