erikras / react-redux-universal-hot-example

A starter boilerplate for a universal webapp using express, react, redux, webpack, and react-transform
MIT License
12k stars 2.5k forks source link

Question: How to debug webpack-dev-server #1220

Open chosenvictim opened 8 years ago

chosenvictim commented 8 years ago

I am new to Universal rendering and i am using this repo as a reference for one of my project. When I hit http://localhost:3000 in the browser, nothing happens, it doesn't load js or any other asset. I am running npm run dev, so webpack-dev-server is running, but there is no way to check logs and hence I can't see what is happening when i hit the URL in the browser. My build is working fine and webpack-dev-server is also running properly without any errors on the console. App port is 3000 and webpack-dev-server port is 3001 (defaults) I have attached browser screenshot as well. Can someone please tell me how to debug this ?

screen shot 2016-07-10 at 1 11 24 am
VSuryaBhargava commented 8 years ago

Try in a different browser or maybe hit your server with a curl call in the terminal.

If you want to log the requests you can add the below in src/server.js ( before line no 31 )

app.use((req, res, next) => {
  console.log(req.originalUrl);
  next();
});