Hi I want to switch my app to production mode and I use windows and Visual Studio Code,I use expressjs in backend and creat-react-app in frontend.Below is the data tree
Below is the package.json and file where dotenv comes from:
And I want to switch it into production mode in backend,below is my backend data tree:
I add script in server.js:
And I also to change NODE_ENV=development
into NODE_ENV=production
in .env
file.
At last I input npm start
like below:
And I get into localhost:5000,but failed.Anyone could advice?