What happens exactly when you run strapi develop vs. strapi start?

My previous dev somehow managed to launch Strapi in production mode when the command issued is strapi develop. He no longer works with me and doesn’t remember how he pulled of that feat from the top of his head.

I assume strapi develop launches a script of sorts, just like strapi start, or it’s an index into a configurable lookup table / object defined in some config file. Searched the whole backend folder for ‘develop’ but nothing came up.

Any ideas how he could have made Strapi start in production mode forcibly? Some .env file trick, that overrides strapi develop’s choice maybe?


Did you check for package.json script section?
this should be the ideal package.json strapi package.json scripts object, in your case package.json ‘develop’ script might got override for ‘start’ one-

"scripts": {
    "develop": "strapi develop",
    "start": "strapi start",
    "build": "strapi build",
    "strapi": "strapi"

Thanks for the reply. I found my error. It was stupid. In the .env file, NODE_ENV was set by another programmer to production and that apparently overrides the choice you make with yarn develop. Maybe this post helps someone look in the same place…