| Summary: | [cf-launcher] lifecycle controls fail for a non-'node' target app | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Deployment | Assignee: | Project Inbox <orion.server-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 7.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
cf-launcher only works for apps whose start command is node _____. |
1. Create a cf-launcher target app whose start command is something other than 'node'. For example this app's start command is 'npm start': # manifest.yml: # --- applications: - name: whatever host: whatever memory: 256M command: node_modules/.bin/launcher -- npm start // main.js // require("http").createServer(function(req, res) { res.end("yo"); }).listen(process.env.PORT); // package.json // { "name": "whatever", "version": "0.0.0", "description": "", "scripts": { "start": "node main.js " }, "dependencies": { "cf-launcher": "0.0.14" } } 2. When the cf-launcher attempts to start the target app, it will produce an error: > Error: Cannot find module '/home/vcap/app/npm' > at Function.Module._resolveFilename (module.js:338:15) > at Function.Module._load (module.js:280:25) > at Module.runMain [as _onTimeout] (module.js:497:10) > at Timer.listOnTimeout [as ontimeout] (timers.js:112:15) ^ This is because the lifecycle control assumes your start command is always "node", so it's actually trying to execute this, which is wrong: $ node npm start