2
Я пробовал все там. У меня очень простое приложение ng2. Это структура файла:Экспресс с угловой 2 cli
mean
|- client (where the ng2 app lives)
| |- dist
| |- (all ng2 app folders)...
|- node_modules
|- routes
| |- index.js
|- views
|- package.json
|- server.js
index.js:
var express = require('express');
var router = express.Router();
router.get('/', (req, res, next) => {
res.render('../client/dist/index.html')
})
module.exports = router;
Когда я запускать server.js и перемещаться в локальном хосте: 3000, сценарии просто не груз:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3000/inline.bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3000/vendor.bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3000/main.bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3000/styles.bundle.css Failed to load resource: the server responded with a status of 404 (Not Found)
Но средняя> клиентская> папка dist имеет все js-файлы. Есть идеи?
Genious! Это решило проблему. Спасибо –
@GastonK вы должны принять этот ответ, так как он решил проблему. –
Сделано @LajosArpad! –