Comments (1)
When we are running on Heroku, we'll have the client and the server on the same port. But on localhost, we are running node server on port 3000 but are running dev-server on port 8080. So on Heroku, we are simply using /api and using http://localhost:3000/api on the localhost.
const ROOT_URL = location.href.indexOf('localhost') > 0 ? 'http://localhost:3000/api' : '/api';
from react-redux-blog.
Related Issues (20)
- Showing error on installing the dependencies HOT 2
- SSR: have you tried to get this working with server-side rendering?
- MongoDB link links to OS X guide
- Run production mode with forever / pm2
- Uncaught TypeError: dispatch(...).then is not a function HOT 1
- renderField and onchange HOT 1
- The heroku demo link does not work
- Router.js:130 Uncaught TypeError: _this.setState is not a function
- Access another user by changing token from session storage
- demo page is not working
- i run: npm run dev: show message errror, please fix issue HOT 1
- webpack doesn't find configuration HOT 2
- its not working in Mozilla
- Post Id
- Dead project?
- Backend web development
- INITIAL_STATE loading prop HOT 1
- Forgot Password Module
- Token is always undefined? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-redux-blog.