Skip to content

Consider altering the generic start command #207

Open
@gilzow

Description

@gilzow

Was working with a client recently who was frustrated with trying to get their application working after using the project:init command. What tripped them up was the generic start command we place when we don't know which start command the app needs.

Given they were unfamiliar with how our system works, they took the command literally

start: "echo 'Put your web server command in here! You need to listen to \"$PORT\" port. Read more about it here: https://docs.platform.sh/create-apps/app-reference.html#web-commands'; sleep 60"

replacing it with:

start: "echo 'npm run start'; sleep 60"

Given the generated config file, they assumed our system required the echo and the sleep 60. They were then further frustrated and confused since they could "see" npm run start being "executed" in the logs.

I know the intention of including this echo was so that someone who didnt read the generated config file and deployed their app would then hopefully see the message in the log, but in this case we have the opposite problem.

I'm not sure what the best course of action is here. My first thought is we should probably prompt the user for the start command if we don't know for sure which one to use, and not put anything in there for them that isn't a real start command. If the user doesn't give us anything (or maybe let them select an 'unsure' option) warn them and open their browser to the docs page on start commands.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions