Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider altering the generic start command #207

Open
gilzow opened this issue Feb 26, 2024 · 1 comment
Open

Consider altering the generic start command #207

gilzow opened this issue Feb 26, 2024 · 1 comment

Comments

@gilzow
Copy link
Contributor

gilzow commented Feb 26, 2024

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.

@gilzow
Copy link
Contributor Author

gilzow commented Feb 26, 2024

FWIW, I know there have been a couple of times where project:init detected parts of what I had in the directory but did NOT warn me that it was going to not include a valid start command. I then spent more than a few minutes trying to figure out what was wrong before I saw the logs.

@akalipetis akalipetis added the Platformify label Jul 2, 2024 — with Linear
@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2025
@akalipetis akalipetis reopened this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants