How to prevent the browser opening launching Strapi

Viewed 354

I'm using strapi version 3.0.0-beta.18.7 and I'm trying to stop the browser opening using the command yarn start (same thing while using yarn test and mocha). I tried to set the autoOpen option to false, but it didn't work.

This is the server configuration of the strapi config environment:

server: {
  host: "localhost",
  port: '1337',
  proxy: {enabled: false},
  cron: {enabled: false},
  admin: {autoOpen: false},
}

Did I miss something to set or this is a bug? thanks

1 Answers

yarn start is primarily used for deployment of your distributed build files. My guess is you ran yarn build before making your configuration change and have not run it since. You shouldn't need to run it, however, if you're running it in develop mode.

Assuming your server configuration is saved in /config/environments/development/server.json then your settings will work as expected by running yarn develop. If you insist on using yarn start you should always preface it by running yarn build first or combine the two via yarn build && yarn start.

Related