vedant sali
vedant sali

Reputation: 80

node.js server for ionic application

I am developing a mobile application using ionic framework. I want to use node.js for developing the server to make REST api calls.

Where should the node.js code be included in the project?

How to deploy such an app as apk? and how to test it?

Upvotes: 0

Views: 1619

Answers (1)

Alex Michailidis
Alex Michailidis

Reputation: 4143

Ionic is based on cordova and it is used to create mobile applications in javascript.

Node.js is based on V8 and it is used to create backend (server) applications in javascript.

Node.js code cannot run on mobiles. So you have two seperate projects.One is the frontend ionic mobile app. And the second is the backend nodejs app.

To make a connection between the two, as ionic uses angularjs take a look at angular's http service. After that you can organize your code in services. For example: http_calls_service.js or api_service.js

As for the testing there are several frameworks to work with. Take a look at this.

Upvotes: 3

Related Questions