angular2-webpack-starter如何将NodeJS服务器添加到项目中

我克隆了angular2-webpack-starter项目,效果很好; 现在我想添加一个单独的NodeJS服务器到这个项目(我需要嘲笑一些数据与NodeJS为后端),但不知道如何以及从哪里开始,有人可以帮忙吗?

这个问题已经解决了,只需要在config / webpack.dev.js中configurationdevServer的代理:

module.exports = { entry:{...}, ... devServer: { host: 'localhost', port: 8086, //frontend port historyApiFallback: true, noInfo: true, watchOptions: { aggregateTimeout: 300, poll: 100 }, outputPath: '/', proxy: { '/api/*': { //backend url prefix, some thing like '/api/users/:userId' target: 'http://localhost:3000', // backend host and port secure: false } } } };