Socket
Book a DemoInstallSign in
Socket

lenode

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

lenode

NodeJS based minimalistic web-server

2.0.0-b
unpublished
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

LeNode is a lesser (minimalistic) NodeJS based Web-server

Features

- Easy setup

You can setup your server by creating .indexes files by JSON format in any directory like this:

{
    "index_own.js" : {
        "executable" : true,
        "charset" : "utf8"
    },
    "second_own_index.html" : {
        "charset" : "win1251"
    },
    "third_own_index.ext" : {}
}

You can execute any file with any extension as a JS file. Any directory will get its parent indexes if you don't overwrite them Next, your executable pages must be created wrapped in page() function like this

page(
    write, // function that writes contents directly to page without buffering
    GET, // GET object (PHP analogue)
    POST, // POST object (PHP analogue)
    REQUEST, // REQUEST object (PHP analogue)
    headers, // request headers
    IP, // remote client IP
    addHeaders, // function that adds headers to queue (if you're used write(), headers will be placed no more). For setting responce code, you may use addHeaders({code:200}) (200 is default). If you will set an existing header, it will be overwrited by new
    polymorph // a function, that ables you easily to create an overflowed functions. Usage:
    /*
        var func = polymorph(
            function(a,b,c){return '3 any args passed';},
            {i: String, a: Boolean},
            function(i,a){return 'Passed string and boolean';}
        );
    */
    ){
    return 'Hell O MFs';
}

- Lightweight

On Windows 10 machine it using ~8-9 MBs of memory

- Extensible

Any changes (excluding main server file) will be applied immediately, there are no need to restart the server

Keywords

lenode

FAQs

Package last updated on 11 Oct 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.