I created an API using express and I want to use it in my front-end server, the issue is that in order for my api to work I have to constantly run it on a server. However I can't do that simultaneously running my react application. So my question is how can I start my react server and api at the same time?
P.S. I tried out concurrently but I'm confused on how to get it working, heres some sample code from my package.json
{
"name": "app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.1.1",
"@material-ui/icons": "^4.2.0",
"axios": "^0.19.0",
"concurrently": "^4.1.0",
"express": "^4.17.1",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "3.0.1"
},
"scripts": {
"start": "node src/connection",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"react": "react-scripts start",
"dev": "concurrently \"npm start\" \"npm react\""
},
"proxy": "http://localhost:3000",
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": []
}
}