Skip to content

Commit

Permalink
documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
ddmitov committed Dec 15, 2018
1 parent 0796c2f commit 988816f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
21 changes: 11 additions & 10 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
Thanks and Credits
--------------------------------------------------------------------------------
# Thanks and Credits

Amata mea Argeia - gratiam magnam tibi ago!
Patientia tua in studiis meis computatoriis auxilium meum maximum!

## JavaScript & Node.js

https://nodejs.org/api/child_process.html

https://google.github.io/styleguide/jsguide.html

http://stackoverflow.com/questions/13230370/nodejs-child-process-write-to-stdin-from-an-already-initialised-process
http://stackoverflow.com/questions/14989081/node-js-to-get-determine-os-version
http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string
http://stackoverflow.com/questions/15515549/node-js-writing-a-function-to-return-spawn-stdout-as-a-string
http://stackoverflow.com/questions/9781214/parse-output-of-spawned-node-js-child-process-line-by-line
http://stackoverflow.com/questions/3133243/how-do-i-get-the-path-to-the-current-script-with-node-js
https://stackoverflow.com/questions/13230370/nodejs-child-process-write-to-stdin-from-an-already-initialised-process
https://stackoverflow.com/questions/14989081/node-js-to-get-determine-os-version
https://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string
https://stackoverflow.com/questions/15515549/node-js-writing-a-function-to-return-spawn-stdout-as-a-string
https://stackoverflow.com/questions/9781214/parse-output-of-spawned-node-js-child-process-line-by-line
https://stackoverflow.com/questions/3133243/how-do-i-get-the-path-to-the-current-script-with-node-js

http://www.tutorialspoint.com/jquery/ajax-serialize.htm
http://www.tutorialspoint.com/nodejs/nodejs_path_module.htm
http://www.tutorialspoint.com/jquery/ajax-serialize.htm

https://gist.github.com/leommoore/4484379 (Node - Processes)
https://www.hacksparrow.com/how-to-write-node-js-modules.html
http://justbuildsomething.com/node-js-best-practices/

## PHP

http://php.net/manual/en/function.phpversion.php
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
elephant-harness
--------------------------------------------------------------------------------
# elephant-harness

[![Travis CI Build Status](https://travis-ci.org/ddmitov/elephant-harness.svg?branch=master)](https://travis-ci.org/ddmitov/elephant-harness)
[![Inline docs](http://inch-ci.org/github/ddmitov/elephant-harness.svg?branch=master)](http://inch-ci.org/github/ddmitov/elephant-harness)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/11338/badge.svg)](https://scan.coverity.com/projects/ddmitov-elephant-harness)
Expand All @@ -10,6 +10,7 @@ elephant-harness
[Node.js](http://nodejs.org/) - [Electron](http://electron.atom.io/) - [NW.js](http://nwjs.io/) package for asynchronous handling of [PHP](http://php.net/) scripts

## Quick Start

``npm install elephant-harness``

```javascript
Expand All @@ -26,9 +27,11 @@ elephantHarness.startScript(phpTest);
```

## Core Dependency

``child_process``

## External Dependency

The only external dependency of elephant-harness is a PHP interpreter on PATH or
a PHP interpreter identified by its full pathname.

Expand All @@ -39,6 +42,7 @@ elephant-harness npm package test will fail if no ``php`` binary is available on
``php-cgi`` binary should be used in [Electron](http://electron.atom.io/) and [NW.js](http://nwjs.io/) applications.

## API

All settings of a PHP script executed by elephant-harness are stored in a JavaScript object with an arbitrary name and the following object properties:

* **script**
Expand Down Expand Up @@ -176,12 +180,14 @@ All settings of a PHP script executed by elephant-harness are stored in a JavaSc

* **requestMethod**
``String`` holding either ``GET`` or ``POST`` as a value.
``requestMethod`` has to be set for PHP scripts reading input data in CGI mode.
``requestMethod`` has to be set for PHP scripts reading input data in CGI mode.

```javascript
phpTest.requestMethod = "GET";
```
or

or

```javascript
phpTest.requestMethod = "POST";
```
Expand All @@ -208,6 +214,7 @@ All settings of a PHP script executed by elephant-harness are stored in a JavaSc
```

## Interactive Scripts

elephant-harness can also start and communicate with interactive scripts having their own event loops and capable of repeatedly receiving STDIN input. Use the following code to send data to an interactive script waiting for input on STDIN:

```javascript
Expand All @@ -224,5 +231,6 @@ elephant-harness demo packages for [Electron](https://www.npmjs.com/package/elep
## [Credits](./CREDITS.md)

## [License](./LICENSE.md)

MIT 2016 - 2018
Dimitar D. Mitov
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elephant-harness",
"version": "1.0.1",
"version": "1.0.2",
"description": "Node.js - Electron - NW.js controller for PHP scripts",
"main": "src/elephant-harness.js",
"directories": {
Expand Down

0 comments on commit 988816f

Please sign in to comment.