Closed Karel-Kroeze closed 8 years ago
Hey there, @Karel-Kroeze.
Just tried to reproduce it, but couldn't do it, but I'm on windows, so that could indicate something.
Couple questions:
http://localhost:3333/api/todos
return an empty array?server/commons/static/index.js
to:"use strict";
const fs = require('fs');
const path = require('path');
module.exports = class StaticDispatcher {
static sendIndex(req, res) {
var _root = process.cwd();
res.type('.html');
fs.createReadStream(path.join(_root + '/client/dev/index.html'))
.pipe(res);
}
}
And then run npm run dev
again.
Let me know how it goes.
If that doesn't work, try using path.join
in server/config/routes.config.js
too:
// Before
application.use(express.static(_root + _nodeModules));
application.use(express.static(_root + _clientFiles));
// After
application.use(express.static(path.join(_root, _nodeModules)));
application.use(express.static(path.join(_root, _clientFiles)));
Closing as there was no response.
After a fresh yo ng-fullstack with the following settings;
and running the documented
npm run dev
, browser refuses to load the ToDo app, since MIME types don't match.This is on a Ubuntu 14.04 box, it looks similar to #151, but that refers to deploying to heroku. I have yet to try a deployed dist build, so can't comment on that.