New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@celastrina/http

Package Overview
Dependencies
Maintainers
1
Versions
231
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@celastrina/http

HTTP Function Package for Celastrina

  • 4.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-99.57%
Maintainers
1
Weekly downloads
 
Created
Source

#celastrina Javascript Framework for simplifying Microsoft Azure Functions and supporting resources. ##Recent Changes

  • Fixed issues on start-up that caused the BaseSentry to lose context.
  • Added ability to load modules in preperation for the Cosmos Module Release. ##Basic Quick-start To use Celastrina.js simply deploy the following to your Microsoft Azure HTTP Trigger function:
"use strict";

const {StringProperty, Configuration} = require("@celastrina/core");
const {JSONHTTPFunction} = require("@celastrina/http");

const config = new Configuration(new StringProperty("function.name"));

class MyFunction extends JSONHTTPFunction {
    async _get(context) {
        return new Promise((resolve, reject) => {
            context.send({message: "_get invoked."});
            resolve();
        });
    }

    async _post(context) {
        return new Promise((resolve, reject) => {
            context.send({message: "_post invoked."});
            resolve();
        });
    }
}

module.exports = new MyFunction(config);

###function.json Update you r Microsoft Azure function.json file with the following directive "entryPoint": "execute". Your in and out bdinges should be named req and res respectively. Your function.json should look something like this:

{
  "entryPoint": "execute",
  "bindings": [
    {
      "authLevel": "function",
      "type": "httpTrigger",
      "direction": "in",
      "name": "req",
      "methods": [
        "get",
        "post"
      ]
    },
    {
      "type": "http",
      "direction": "out",
      "name": "res"
    }
  ]
}

##Detailed Help & Documentation Please visit https://www.celastrinajs.com for a comprehensive quick-start guide and complete documentation on using Celastrina.js.

Keywords

FAQs

Package last updated on 10 Nov 2021

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