0

I am creating an angular 2 project which will use Node.Js as backEnd and Node.Js will make calls to 3rd party external APIS(Like Gandi) which accept calls only from Python, PHP or Node.Js.

I have chosen Node.Js.

I have called few APIs from Angular 2 services using HTTP protocol. Now I do not know where to write this Node.Js code and how to Integrate this Node.Js code with Angular 2 services.

I think, Just a sample application or sample architecture which is a combination of Node.Js and Angular 2 will help a lot.

Do I need to create Restful services using Node.Js?

If Yes, Do I need to use Express.Js also for server purpose?

Note: I do not want a Mean Stack application(No Mongo DB)

2 Answers 2

1

Actually it's pretty straightforward.

What I'd do is to simply consider the Angular 2 app on the frontend and the Node.Js API on the backend as independent projects. It's very likely that they will run on different providers (eg. Firebase for Angular 2 app and Heroku for the Node.js server) so it makes sense to handle them as 2 different projects with it's unique dependencies.

I have recently done a similar project, using Angular 2 + webpack as frontend and Django on the backend: https://github.com/damnko/angular2-django-movies

Hope this makes sense, otherwise please let me know

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

4 Comments

Thanks, Can you give me an example of rest based api using Node.Js which is making call to any 3rd party API ?
you mean you want to call an external API from the Node.Js backend or from within Angular 2 to the Node.Js backend?
I want to call an external APi from Node.Js Backend
From within Express for example you can use npmjs.com/package/request to call external APIs
0

i think this repo will serve your purpose. https://github.com/singh15/feed-server which is using twitter api to get data and send that data to any front-end.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.