Socket
Socket
Sign inDemoInstall

dambreaker

Package Overview
Dependencies
50
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dambreaker

Streamify your web server


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

DamBreaker

Streamify your web server.

stream.write({ word: "Dam" });
stream.end({ word: "Less" });

DamBreaker is the first NodeJS web server dedicated to streamify all responses.

npm install dambreaker --save

NPM Build Status Coverage Status NPM Download Dependencies Status

Features

 * Structured your project using services.  * Dependency Injection to override default behavior.

  • Compression & minification
  • 0 disk access at runtime
  • Configuration
  • Security

Service.js

class Service {	
};

text(context, stream, headers) {
 stream.write("Hello");
 stream.end("world")
};

json(context, stream, headers) {
  stream.write({ name: "peter" });
  stream.end({ name: "folk" });
};

exports = module.exports = Service;

Dependency Injection

Inject your service and define a new http route.

Override core services to custom DamBreaker.

{
  "services": [
    { "name": "service", "location": "./service"}
  ]
  "http-routes": [   
  ]
}

DamBreaker Configuration

{
    "services": "./services.json",
    "http": {
        "port": 3000
    }
}

Enjoy

Create a server.js



const DamBreaker = require("dambreaker");
const dambreaker = new Damless();
await dambreaker.start();

Run server on http://localhost:3000

Use other DamBreaker services to develop as fast as a rocket

You want to see some examples

To run our examples, clone the Qwebs repo and install the dependencies.

$ git clone https://github.com/BenoitClaveau/dambreaker --depth 1
$ cd dambreaker
$ npm install
$ cd exemples/helloworld
$ node server.js

Test

To run our tests, clone the Qwebs repo and install the dependencies.

$ git clone https://github.com/BenoitClaveau/dambreaker --depth 1
$ cd dambreaker
$ npm install
$ cd tests
$ node.exe "../node_modules/mocha/bin/mocha" .

Keywords

FAQs

Last updated on 12 Apr 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc