4.0.1 • Published 5 months ago

webox-node v4.0.1

Weekly downloads
2
License
MIT License
Repository
github
Last release
5 months ago

Webox-node is a Dynamic JS HTTP server

Webox-node can execute js file through node-cli, just like CGI. It can also load js file as commonjs module, just like PHP and ASP.

install

npm i webox-node

simple start

npx webox

The web server will listen on 127.0.0.1:80 and use ./webroot as the root directory.

publish your website

npx webox 0.0.0.0:80 public

The web server will listen on 0.0.0.0:80 and use ./public as the root directory.

Other users can use your internal ip to access your published site.

execute js as cgi script

Dynamically parse *.cgi or '*.cgi.js, and then output the result to browser.

load js as commonjs module

Dynamically parse *.cjs or '*.cjs.js, and then output the result to browser.

normal exit with 0 or 1

Set process.env.WEBOX_EXIT_CODE to 1, Even if the program exits normally, an error will be reported.

config with file

Please set process.env.WEBOX_CONF_FILE to config file path.

module.exports = {

    WEBOX_MODE: 'development',

    WEBOX_HOST: '127.0.0.1',

    WEBOX_PORT: 80,

    WEBOX_ROOT: 'webroot',

    WEBOX_INDEX: [
        'index.html',
        'index.htm'
    ],

    WEBOX_ERROR: {
        200: '%s',
        400: 'Bad Request: %s',
        403: 'Forbidden : %s',
        404: 'NO Found: %s',
        500: 'Internal Server Error: %s',
        503: 'Service Unavilable: %s'
    }

};
4.0.1

5 months ago

3.3.13

11 months ago

3.3.14

11 months ago

3.3.15

11 months ago

3.3.16

11 months ago

3.3.11

2 years ago

3.3.12

2 years ago

3.3.10

2 years ago

3.3.9

2 years ago

3.3.8

2 years ago

3.3.7

2 years ago

3.3.5

2 years ago

3.3.4

2 years ago

3.3.3

2 years ago

3.3.1

2 years ago

3.2.2

2 years ago

3.2.3

2 years ago

3.0.4

3 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.5

3 years ago

3.0.0

3 years ago

2.5.0

3 years ago

2.3.6

3 years ago

2.5.3

3 years ago

2.5.6

3 years ago

2.5.8

3 years ago

2.5.7

3 years ago

2.3.0

3 years ago

2.2.1

3 years ago

2.0.3

3 years ago

2.2.0

3 years ago

2.0.2

3 years ago

2.3.2

3 years ago

2.3.1

3 years ago

2.2.2

3 years ago

2.3.4

3 years ago

2.3.3

3 years ago

2.3.5

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.2

4 years ago

1.2.0

4 years ago

1.2.1

4 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.0

5 years ago