You can build a Cordova app using Monaca Cloud & Remote Build API. It can also be integrated with other web services. Once integrated, you will be able to use cloud services and remote build functions as if you are using Monaca Cloud IDE or Monaca CLI.
In this page, we will talk about how to integrate Monaca Cloud & Remote Build API with Node.js projects and its usage.
Monaca Cloud & Remote Build API is wrapped in a npm library called monaca-lib. In order to use the APIs in your Node.js project, please do as follows:
Install monaca-lib
.
$ npm install monaca-lib
Call this module in your js file:
var Monaca = require('monaca-lib').Monaca;
You can now use any Monaca Cloud & Remote Build API in your js file now. For example:
var Monaca = require('monaca-lib').Monaca;
var monaca = new Monaca();
monaca.login('[email protected]', 'password').then(
function() {
console.log('Succesfully logged in!');
},
function(error) {
console.log('Login failed: ' + error);
}
);
The supported features for Monaca Cloud & Remote Build API are as follows:
Please refer to monaca-lib/src/monaca.js
file regarding the list of all availabe APIs and their usage.