Actually the way of setting environment variables is different between different Operating System.
set PUBLIC_URL=http://xxxx.com&&npm start
(Note: the lack of whitespace is intentional.)
PUBLIC_URL=http://xxxx.com npm start
cross-env
{
"scripts": {
"serve": "cross-env PUBLIC_URL=http://xxxx.com npm start"
}
}