title: How to build and deploy an app from local directory?
body: <p>I just started exploring <code>OpenShift Online 3</code> and it seems really awesome.
  I'm trying to setup a simple HTTP server.
  Here are my steps using <code>CLI</code>:</p>
  
  <ol>
  <li>oc login &lt;...></li>
  <li>oc new-project &lt;...></li>
  <li>oc new-app .</li>
  </ol>
  
  <p>My current working folder consists of two files <code>package.json</code> and <code>server.js</code>.</p>
  
  <p><strong>Package.json</strong></p>
  
  <pre><code>{
    "name": "test",
    "version": "0.0.1",
    "description": "Node.js app for OpenShift 3",
    "main": "server.js",
    "dependencies": {
      "express": "^4.13.4"
    },
    "engine": {
      "node": "*",
      "npm": "*"
    },
    "scripts": {
      "start": "node server.js"
    }
  }
  </code></pre>
  
  <p><strong>Server.js</strong></p>
  
  <pre><code>const express = require('express')
  const app = express()
  
  const port = process.env.PORT || process.env.OPENSHIFT_NODEJS_PORT || 8080
  const ip = process.env.IP   || process.env.OPENSHIFT_NODEJS_IP || '0.0.0.0'
  
  app.get('/', function (req, res) {
    res.status(200).send({ message: 'OK' })
  })
  
  // error handling
  app.use(function(err, req, res, next){
    console.error(err.stack)
    res.status(500).send('Something bad happened!')
  })
  
  app.listen(port, ip)
  console.log('Server running on http://%s:%s', ip, port)
  
  module.exports = app
  </code></pre>
  
  <hr>
  
  <p><strong>Here's console output:</strong></p>
  
  <pre><code>--&gt; Creating resources ...
      imagestream "olmeo-openshift" created
      buildconfig "olmeo-openshift" created
      deploymentconfig "olmeo-openshift" created
      service "olmeo-openshift" created
  --&gt; Success
      Build scheduled, use 'oc logs -f bc/olmeo-openshift' to track its progress.
      Run 'oc status' to view your app.
  </code></pre>
  
  <p><strong>After build is done web console shows an error:</strong></p>
  
  <pre><code>Environment: 
      DEV_MODE=false
      NODE_ENV=production
      DEBUG_PORT=5858
  Launching via npm...
  npm info it worked if it ends with ok
  npm info using npm@3.10.9
  npm info using node@v6.11.3
  npm ERR! Linux 3.10.0-693.12.1.el7.x86_64
  npm ERR! argv "/opt/rh/rh-nodejs6/root/usr/bin/node" "/opt/rh/rh-nodejs6/root/usr/bin/npm" "run" "-d" "start"
  npm ERR! node v6.11.3
  npm ERR! npm  v3.10.9
  npm ERR! path /opt/app-root/src/package.json
  npm ERR! code ENOENT
  npm ERR! errno -2
  npm ERR! syscall open
  
  npm ERR! enoent ENOENT: no such file or directory, open '/opt/app-root/src/package.json'
  npm ERR! enoent ENOENT: no such file or directory, open '/opt/app-root/src/package.json'
  npm ERR! enoent This is most likely not a problem with npm itself
  npm ERR! enoent and is related to npm not being able to find a file.
  npm ERR! enoent 
  
  npm ERR! Please include the following file with any support request:
  npm ERR!     /opt/app-root/src/npm-debug.log
  </code></pre>
  
  <p>Apparently, <code>package.json</code> can't be found. What am I missing?</p>