How to setup angular-cli for configuring node services for angular2 app? #2068
Description
Hi All,
I have setup the angular2 app using angular-cli@webpack.
Now I have my node services setup using gulp.
and I was starting it as :
`gulp.task('json-server',function(){
// Start the server at the beginning of the task
console.log('Start the server at the beginning of the task');
server.run(['server/json-server-starter.js']);
});`
in my package.json I modified script as:
"start": "start ng serve && start gulp"
thus, it was starting my angular2 app along with json-server.
I want to migrate it to webpack i.e. configure all of my node-services using webpack only.
But I am not able to find webpack.config.js file in my app from where I can start my node-server.
I also want to know what the ideal project structure should be?
I mean should I use express-generator and then modify it to add my angular2 app or I can use angular-cli structure itself to configure my node services?
I tried using cli structure but I dont know how to use webpack for starting my node-server too.
My Configurations :
-
OS:
Windows 7 -
Versions.
angular-cli: 1.0.0-beta.11-webpack.2
node: 6.4.0
os: win32 x64 -
Repro steps. : ng new angular-mongo-connectivity
any inputs?
Thanks in advance.
Activity
ValeryVS commentedon Sep 12, 2016
See
--proxy-configThere are docs in PR
#1896
filipesilva commentedon Sep 20, 2016
@ValeryVS's comment is the best way I know to do this as well.
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.