Converting an node js app to android app - node.js

I have developed a web app in node js using express which also involves mongodb. How to convert it to an android app ?
My main app file is directly inside the main application folder.

Your subject in this thread looks confuse. I think that you want to convert web application (can be express.js app, php app, or jsp, etc) into mobile application (ios or android).
If it is so, you can use cordova to do it.
Please read this document.
http://cordova.apache.org/docs/en/3.5.0/guide/cli/index.html

Related

Is it possible to turn express server serving react frontend into desktop app using electron?

I have made a web app using express and react, and I want to bundle it into a desktop application, is this possible using electron?
I recommend the tutorial at: https://www.electronforge.io/guides/framework-integration/react
This isn't too hard actually, you can find all instructions you need in https://www.electronforge.io/
To accomplish this, either your app keeps hosting it with express locally and electrons connects to localhost, or even better, do it by not hosting any servers and just keeping your JSX and html files in your project.
If you're using TypeScript and ES6, also consider taking a look here for some examples: https://www.electronforge.io/templates/typescript-+-webpack-template

How do i convert MERN web app to desktop app?

I have created a simple billing web application using Node, Express, React and MongoDB
However i want to convert it into a Desktop application for local machines.
I know it is possible using electron, but i don't know how to do it.
Can anyone help me or provide with necessary resource?
you can use this boilerplate to get start a new project with react and electron.
Your build HTML file will act as the view file for your electron app.Which should be build by react-scripts.Use express server in separate file and use the server.
Handle requests just like you do in a MERN app.you only need to set the view to the bundled HTML file.

Can Node.JS integrate inside Flutter mobile application?

I created a mobile application with flutter in front end and back end with node.js but I want it to use node js in offline mode in another meaning I want host this node inside the mobile. can I?
No.
First, you'd need NodeJS itself built for you mobile platform. Only then can you even consider running the node application you've written.
Flutter is Dart and NodeJS is well, JS. You can't put them together. But if you are building a node app that builds into a static js and html, may be you can put it in a webview, which does not seem to be the case here.
You are asking to run server side code on the client itself and offline too. If the application can really be offline, I think you're better off without a backend and store everything static within the flutter app itself.

Can you convert MEAN applications with a compiler to App store?

As we all know you can use compilers as Cordova to convert web applications so you can upload your application to the app store.
This can easily be done when developing with HTML5 and Node.
But is it possible to convert a MEAN application (MongoDB, Express, Angular and Node)?
You can run nodejs server on mobile with jxcore, but I think you should run only client side part on cordova and api shall stay on server. Ideally, I think that api and client side must be separate projects.
No, you can't.
MEAN stack is full stack. You can make your frontend an app with cordova but you still need database and backend service.
But that's ok. Make your app mobile friendly and stick with your server to provide the data you need to make it work.
What you can do, it's to create hosted web app. This is existing web application, just wrapped to make it possible to submit to app store.
For this you can use Manfoldjs, for example Using Cordova Plugins in Hosted Web Apps or if you use Visual Studio, you can use Visual Studio Tools
for Apache Cordova.

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?
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.

Resources