GithubHelp home page GithubHelp logo

skyformat99 / hustngx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jobs-github/hustngx

0.0 3.0 0.0 6.74 MB

Nginx module development kit

License: BSD 3-Clause "New" or "Revised" License

Python 17.77% C 81.27% Objective-C 0.76% C++ 0.03% Shell 0.17%

hustngx's Introduction

简体中文

hustngx - nginx module development tool kit for lazy man

logo

What is hustngx?

hustngx is a framework used for nginx module development, with automation feature on code generator.

If you:

  • Know nothing about nginx source code
  • Know nothing about nginx configuration
  • Know nothing about how to build nginx
  • Know nothing about how to debug nginx
  • Know nothing about nginx module
  • Know nothing about upstream, proxy, subrequest

Then, you'd better study the contents as below before starting to use hustngx:

Emiller's Advanced Topics In Nginx Module Development

Without the accumulation of knowledge as above, you

  • Will be hard to understand the paradigm concluded by hustngx

  • Will still be all at sea even it has generated a great deal of code for you

For issues on nginx configuration, please refer to here:

nginx configuration on upstream

nginx configuration on proxy

If you:

  • own prime material for nginx module development

  • require a functional fundamental library for nginx module development

  • require a automation tool kit for mass development on nginx module

  • do not want to be beset by problems on subrequest during nginx module development

Then hustngx is the right tool kit tailored for you. You will work faster and smarter with hustngx.

hustngx

What does hustngx have?

modules

Limitation

The latest hustngx supports nginx 1.12.0 stable version

Usage

Untar hustngx.tar.gz, cd to folder hustngx, edit file hello.json and add contents as below:

{
    "module": "hustmqha",
    "handlers":
    [
        {
            "uri": "test"
        }
    ]
}

Run command:

python hustngx.py nginx-1.12.0.tar.gz hello.json

Then folder hustmqha will be generated. switch to this folder and you will see the following files:

nginx            # nginx src folder
deploygen.py     # script generator for onekey deployment
deploy_ngx.json  # configuration for deploygen.py
hosts            # machines configuration for deploygen.py
deploy.sh        # onekey deployment script (generated by deploygen.py+deploy_ngx.json+hosts)
upgrade.sh       # nginx smooth upgrade script

Switch to folder nginx/conf, edit file sample.json as below:

{
    "module": "hustmqha",
    "worker_connections": 1048576,
    "listen": 8080,
    "local_cmds": ["/test"]
}

Generate nginx configuration:

python genconf.py sample.json

Build and install nginx:

cd hustmqha/nginx/
sh Config.sh && make install

After installed, start nginx:

cd /data/hustmqha/sbin
./nginx

Input the following test command:

curl -i -X GET 'localhost:8080/test'

Then server will output the following information:

HTTP/1.1 200 OK
Server: nginx/1.12.0
Date: Tue, 18 Apr 2017 03:54:37 GMT
Content-Type: text/plain
Content-Length: 12
Connection: keep-alive

Hello World!

Server works just fine if the above result is returned.

Documents

More details see in here

License

hustngx is licensed under New BSD License, a very flexible license to use.

Author

More

  • High-performance Distributed Storage - huststore

hustngx's People

Contributors

jobs-github avatar

Watchers

James Cloos avatar skyformat99 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.