how to call api endpoint in javascript to use in react web app code example Example: command to start api on react npm run api