Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
94e927bd
Commit
94e927bd
authored
Dec 13, 2013
by
zeke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create a default Procfile if server.js is present
parent
e9b3a966
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
compile
bin/compile
+6
-4
No files found.
bin/compile
View file @
94e927bd
...
...
@@ -84,12 +84,14 @@ rm -rf "$build_dir/.npm"
if
[
!
-e
$build_dir
/Procfile
]
;
then
npm_start
=
$(
cat
$build_dir
/package.json |
$bp_dir
/vendor/jq
-r
.scripts.start
)
if
[
"
$npm_start
"
==
"null"
]
;
then
status
"Procfile not found and npm start script is undefined"
protip
"Create a Procfile or specify a start script in package.json"
else
# If `scripts.start` is set in package.json, or a server.js file
# is present in the app root, then create a default Procfile
if
[
"
$npm_start
"
!=
"null"
]
||
[
-f
$build_dir
/server.js
]
;
then
status
"No Procfile found; Adding npm start to new Procfile"
echo
"web: npm start"
>
$build_dir
/Procfile
else
status
"Procfile not found and npm start script is undefined"
protip
"Create a Procfile or specify a start script in package.json"
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment