Coder Social home page Coder Social logo

felipeconti / cgi-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deda-ca/cgi-node

0.0 2.0 0.0 45 KB

CGI Node.js complete module to replace PHP on shared hosting such as GoDaddy

Home Page: http://www.cgi-node.org/

License: MIT License

ApacheConf 0.20% JavaScript 99.80%

cgi-node's Introduction

cgi-node

CGI-Node is designed to replace PHP on any shared web hosting site.

CGI-Node provides the ability to run JavaScript on any web server just like PHP as a CGI using Node.js.

Essentially allowing developers to use a single programming language, JavaScript, for both client and server. You can even run the same code (libraries) on the client or server, reducing development time and code base.

CGI-Node run on shared hosting sites running Apache. It can run along side PHP.

Features

  • Complete and easy access to the HTTP Request:
    • url: The node.js URL object.
    • method: GET | POST | ...
    • headers: {name: value, ...}
    • cookies: {name: value, ...}
    • query/forms: {fieldName: fieldValue, ....}
    • POST data such as forms and files
  • Complete and simple HTTP Response interface:
    • headers: get/set/remove response header fields.
    • cookies: full cookies support between client and server (@see sessions)
  • Full server-side Session management:
    • Store cookies on the server.
    • Store any data that persists between every request.
  • Automatic error handling and global exception handler with HTML output to browser.

Easy Setup

  • Download the appropriate Node.js binary from here and copy it to your bin folder on your site.
  • Download cgi-node.js from here and copy it to your cgi-bin folder on your site.
  • Update the first line within cgi-node.js to point to the location of the node executable you uploaded earlier. For example:
    #!/home/mysite/bin/node
  • Ensure you have .htaccess file that contains the following information:
       Action cgi-node /cgi-bin/cgi-node.js 
       AddHandler cgi-node .jss

That's it!

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.