Closed tullo closed 8 years ago
The static/index.js gives the 404
<!doctype html>
<html>
<head>
<title>Your Cool React App!</title>
</head>
<body>
<div id='root'><div data-reactid=".2gjcdesgb28" data-react-checksum="-51373845"><h1 data-reactid=".2gjcdesgb28.0"></h1></div></div>
<script>
window.BOOTSTRAP_CLIENT_STATE = {"books":{"items":[{"id":1,"text":"Book 1","count":2},{"id":2,"text":"Book 2","count":3},{"id":3,"text":"Book 3","count":4}]},"routing":{}}
</script>
<script src="/static/index.js"></script>
</body>
</html>
Steps to reproduce:
tree -L 1
├── app-home.js
├── circle.yml
├── devServer.js
├── LICENSE
├── node_modules
├── package.json
├── README.md
├── source
├── static
├── webpack.config.dev.js
└── webpack.config.prod.js
But the server side references (server/app.js) the ./build directory to serve '/static/index.js'
const buildDir = '/build';
const staticDir = path.join(settings.APP_HOME, buildDir);
app.use('/static', express.static(staticDir));
The README should probably also mention what route to take (/test-data) so noobs like me don't look like a big ? when nothing happens under /