Download the PHP package lifespikes/php-node without Composer

On this page you can find all versions of the php package lifespikes/php-node. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-node

PHP Node

Simple library for executing short-lived NodeJS processes from PHP.

Hi Packagist :) https://packagist.com/orgs/lifespikes/packages/3021975

Who is this for?

Every language and platform has their pros and cons, for us one of the biggest benefits of JavaScript is being able to whip up programs in the span of a few minutes.

This package is for developers who want a simple, object-oriented, library to integrate microservices written in Node in their PHP apps.

All this for a process manager?

PHP Node is a library we built to leverage power from multiple languages different members of our team specialize in and their awesome ecosystems. Naturally we want these integrations to be as seamless as possible with the rest of our code, but we also don't want to make anything more complicated than it needs to be.

Instead of implementing separate APIs for each service using let's say a SOAP or REST interface using Express, or deploying these services as docker containers, PHP Node helps us:

Examples

Using PHP Node is pretty straight forward.

The very first step is going to be making sure you have NodeJS installed on your machine. The version you run is up to you. Then, make sure the path to Node is present in your PATH, or set as a NODE_BINARY environment variable.

Now make sure your script is accessible by your web server or PHP process owner.

Lastly, make sure to expect input on your script by receiving it using stdin, instead of argv. We opted for using the stream route to allow us to broadcast reliable and larger chunks of data.

(This library is pretty awesome at this: https://www.npmjs.com/package/get-stdin)

Then, just run it. In this example we're using a microservice to take a screenshot of a website:

For context, we'll write another small pseudo-script:


All versions of php-node with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lifespikes/php-node contains the following files

Loading the files please wait ....