0.0.2 • Published 3 years ago

simple-serverless-framework-2 v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

simple-serverless-framework

NPM version Build Status Coverage Status

Features

Installation

This library is published in the NPM registry and can be installed using any compatible package manager.

npm install simple-serverless-framework --save

# For Yarn, use the command below.
yarn add simple-serverless-framework

Installation from CDN

This module has an UMD bundle available through JSDelivr and Unpkg CDNs.

<!-- For UNPKG use the code below. -->
<script src="https://unpkg.com/simple-serverless-framework"></script>

<!-- For JSDelivr use the code below. -->
<script src="https://cdn.jsdelivr.net/npm/simple-serverless-framework"></script>

<script>
  // UMD module is exposed through the "SimpleServerlessFramework" global variable.
  console.log(SimpleServerlessFramework);
</script>

Usage

Initialization

SimpleServerlessFramework.init({
  database: {
    URI: '' // connects to mongoose before any Consumers, Endpoints or Schedules
  },
  endpoints: {
    secret: '', // used to token authenticate
    middlewares: [], // middlewares that will run before any endpoint
    middlewaresAfterAuthenticate: [] // middlewares that will run after any endpoint
  },
  aws: {
    id: '', // AWS ID Account (required)
    region: '' // AWS Region (required)
  },
  stage: '' // dev or prod (required)
})

Database

SimpleServerlessFramework.Database.model({
})

SimpleServerlessFramework.Database.schema({
})

SimpleServerlessFramework.Database.relationships({
})

Services

SimpleServerlessFramework.Services.register({
})

Consumers

SimpleServerlessFramework.Consumers.register({
})

Endpoints

SimpleServerlessFramework.Endpoints.register({
})

SimpleServerlessFramework.Endpoints.Controllers.list({
})

SimpleServerlessFramework.Endpoints.Controllers.details({
})

SimpleServerlessFramework.Endpoints.Controllers.create({
})

SimpleServerlessFramework.Endpoints.Controllers.update({
})

SimpleServerlessFramework.Endpoints.Controllers.activateDeactivate({
})

SimpleServerlessFramework.Endpoints.Controllers.softDelete({
})

SimpleServerlessFramework.Endpoints.Controllers.delete({
})

Schedules

SimpleServerlessFramework.Schedules.register({
})