Node.js project for both web app and native mobile app?

Can we use Node.js with bootstrap for both web app and native mobile app using a single project?

I want to create both with just a single project. Not a different project for web app and for mobile app. Can I know if it’s something doable with wappler?

You can’t use server side code for mobile apps, you need a separate mobile project which is using html.

I’ve read that capacitor is also available for webapp. Can I just build a Capacitor with bootstrap project and have it run both the web app and mobile app parts of the app? Maybe then just use the node js for landing pages and other pages of the app?

You can’t use Node at all in a mobile app if you are planning on submitting it to the app stores.

Can I just then use capacitor for both web app and mobile?

I have never heard of anyone using Capacitor in a web app. Doesn’t mean you can’t. What are you trying to accomplish?

Maybe someone with more Capacitor experience can chime in.

I’m trying to create a front end for both web app and native mobile app using a single project. This will lessen the need to create a project for web app and a different project for native mobile apps which will help us maintain if easier. Like updating one project for both web and native mobile at the same time.

No that’s also not possible, the only way to achieve the same web and mobile experience with a single project is to create a responsive bootstrap 5 based site, without a separate mobile app.

Okay thanks. Maybe a webview will work?

Can this be supported with wappler?

or any other web wrapper can you recommend that has good native mobile support?

As Teodor mentioned, what you are trying to do is not possible. They need to be two separate projects as the set up and requirements is completely different.

You CAN create just two Projects (remember they have to be HTML only, for the Mobile side). One for your back-end and one for the Mobile application. You can then ftp the contents of the ‘www’ directory, within the Mobile Project, to your hosting environment.

Or symlink the www folder. I do this for our mobile app projects–they all use the same source folder but have their own project files.

1 Like