简体   繁体   中英

Cannot open the react-foundation starter project

I'm new to React and Node, so I apologize ahead of time if this question shows a high level of ignorance when it comes to the subject. I'm trying to use the react-foundation library, and they provide a starter boilerplate at this link: https://github.com/nordsoftware/react-starter . I follow the directions to

  1. Install the dependencies using "npm install"
  2. Start the development server with "npm start".

I cannot figure out how to get the page to open in my browser. I tried making a server.js file, and running "node server.js," but I get a "Cannot GET /" error. I do not know how I can open this in by the browser.

When you "npm start", it should tell you where webpack-dev-server is serving at in the console log. Otherwise, I can see this in the webpack config file, dev mode:

development.entry.app.push('webpack-dev-server/client?http://localhost:8080'); 

( https://github.com/nordsoftware/react-starter/blob/develop/webpack/development.js )

So try pointing your browser to localhost:8080 . You don't need a supplementary server.js file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM