Reputation: 21
I'm on a project cross-platform where the client wants a website, an iOS application and an android app. I chose cordova to realise it. But I have one question, can I host my application like a classic website on a distant server ?
Maxime
Upvotes: 1
Views: 1949
Reputation: 139
EDIT: the following is only for testing, not production
Cordova supports the browser platform.
By running cordova platform add browser
you add it to your project and with cordova run browser
you run your app in a browser. To run it in a specific port, you need to run cordova run browser -- --port=1234
.
You can add, build and run the iOS and Android platforms in the same project.
Take a look here https://www.raymondcamden.com/2016/03/22/the-cordova-browser-platform/
Upvotes: 0
Reputation: 11702
While you might be able to reuse parts of your HTML, CSS and JavaScript for the website, Cordova apps run on physical devices like phones and tables and interact (access device capabilities) with the underlining operating system like Android and iOS.
When you have an existing server-based web app, and you want it running in a Cordova app, you'll have to migrate it. Depending on what your application does you could use a thin Cordova client (think of it as a web browser embedded in a native app) that automatically redirects to your web site.
Link to officially supported platforms. https://cordova.apache.org/docs/en/latest/guide/support/index.html
Upvotes: 1