How can we dynamically run different start scripts per local environment in React?

As part of our development environment we’ve chosen to launch React on port 3006, rather than the usual port of 3000.

On a Mac, you can achieve this by adding the following to package.json.

  "scripts": {
    "start": "PORT=3006 react-scripts start",

But on Windows, you have to add the following instead.

  "scripts": {
    "start": "set PORT=3006 && react-scripts start",

As we have developers working with both machines (Mac and Windows), is there a good way to handle the different start scripts on each machine?

Source: ReactJs