New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@leverage/plugin-http

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leverage/plugin-http

HTTP plugin for leverage

npmnpm
Version
2.1.0
Version published
Weekly downloads
4
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Leverage Logo

Coverage Status Build Status
forthebadge forthebadge

HTTP for leverage!

npm i -S @leverage/plugin-http

Hello World

For a "Hello World", we'll create a simple http server that responds to requests with a "Hello World".

First, install the HTTP plugin:

npm i -S @leverage/core @leverage/plugin-http

Now, we will write an HTTP component and load our component and the HTTP plugin:

import { Manager } from '@leverage/core';
import http from '@leverage/plugin-http';

const manager = new Manager();

const route = {
    is: 'component',
    config: {
        type: 'http',
        http: {
            path: '/',
            method: 'get'
        }
    },

    http (request, response) {
        response.send('Hello World');
    }
}

manager.add(route);

http.listen(8080);

Want To Dig In Deeper?

Check out the wiki!

Learn from example applications:

  • coming soon

Roadmap

Most (if not all) roadmap items are tracked on the project board.

Keywords

leverage

FAQs

Package last updated on 16 Mar 2018

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