Skip to content

Scalingo/sample-php-nodejs

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Sample PHP/NodeJS application

PHP

The slim microframework is used to handle the PHP part

NodeJS

NodeJS is installed to install/build assets. If you want the assets to be built on deployment time, you have to add the tools you're using to the dependencies of your app:

npm install bower --save
npm install gulp --save
git add package.json
git commit -m "Set bower and gulp as dependencies"

The different tasks are specified in the composer.json file of the PHP project

{
  
  "extra": {
    "paas": {
      "compile": [
        "node_modules/.bin/bower install",
        "node_modules/.bin/gulp bundle"
      ]
    }
  }
}

Deployment

scalingo create my-app
scalingo --app my-app env-set DOCUMENT_ROOT=/
git push scalingo master

Usually the buildpack is chosen automatically, but as this application is using two distinct technologies, it has to be specified.

That's it your app is live.

http://sample-php-nodejs.scalingo.io

About

Simple PHP application using NodeJS (bower, gulp) for assets management

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published