2

I'm currently learning Angular and I have a question. How are we supposed to use nodeJS as a backend for our project.

To launch a dev angular project, you need to ng serve and to launch a server nodes, you need to node app.js.

So what are we supposed to do first ? launch a nodeJS server and then ... what ?

or

ng serve the angular app and then... what ?

I'm sorry if my question sound stupid for some, but I'm really trying to understand how it works here.

2
  • 1
    You could use your Node server to also serve up the built Andular project. Or you could run them separately, and just have your Angular app make it's API requests the the Node.js endpoints. Commented Apr 23, 2022 at 18:04
  • Angular app and node app would be seperate entities in this case. If you want to use api endpoints from node app into your angular app, then you will need that node app running, Commented Apr 23, 2022 at 18:07

1 Answer 1

1

Using angular with node js as backend is usually called MEAN stack.There is plenty of tutorials on youtube about MEAN stack. This YouTube video could be a good point for starting.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.