Socket
Book a DemoInstallSign in
Socket

@slsplus/core

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slsplus/core

Serverless Plus Components

latest
Source
npmnpm
Version
1.1.8
Version published
Weekly downloads
4
100%
Maintainers
1
Weekly downloads
 
Created
Source

Serverless Plus Components Core

Thanks to serverless/components.

Build, compose, & deploy serverless apps in seconds with Serverless Components, the Serverless Framework's new infrastructure provisioning technology.

    • Speed - The fastest way to deploy serverless infra and apps.
    • Power - Deploy low-level infra, or higher-order use-case abstractions.
    • Re-Use - Everything you build is reusable by you, your team, and (if you want) the world.
    • Composition - Easily compose Components together in YAML or Javascript.

Here's how easy it is to use Components with Serverless Framework:

# serverless.yml
name: website

website:
  component: '@serverless/tencent-website'
  inputs:
    code:
      src: ./src
      hook: npm run build

Quick-Start

Install the Serverless Plus via NPM:

$ npm i -g slsplus

部署 Serverless 全栈 WEB 应用(React.js)

本示例以 React 为前端,Express 框架作为后端,通过多个 Serverless Components 部署 Serverless 全栈应用程序。

$ slsplus create --template-url https://github.com/serverless-plus/components/tree/master/templates/tencent-fullstack-react-application

Reusability

While Serverless Components can be easily composed in YAML (serverless.yml), they are written as reusable javascript libraries (serverless.js), with simple syntax inspired by component-based frameworks, like React.

// serverless.js

const { Component } = require('@serverless/core')

class MyBlog extends Component {
  async default(inputs) {
    this.context.status('Deploying a serverless blog')
    const website = await this.load('@serverless/tencent-website') // Load a component
    const outputs = await website({ code: { src: './blog-code' } }) // Deploy it
    this.state.url = outputs.url
    await this.save()
    return outputs
  }
}

module.exports = MyBlog

Anyone can build a Serverless Component and share it in our upcoming Registry.

Resources

awesome-serverless-framework

FAQs

Package last updated on 02 Apr 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