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

@serverless/platform-client

Package Overview
Dependencies
Maintainers
3
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serverless/platform-client

This Serverless Platform SDK makes it easy to interact with the Serverless Platform and perform operations on it. Please note that there is an existing `@serverless/platform-sdk` npm module for interacting with the Serverless Inc. SaaS original platform s

  • 4.5.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
890K
decreased by-5.89%
Maintainers
3
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 16 Nov 2023

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