I have an Ionic project and I want it to work as if it is a web server (say mamp + php).
Since ionic is able to display a project in browser localy (using ionic serve), I am pretty sure it is able to do that. I have a simple ovh server.
How could I do that ?
You gonna need send all your project files (www folder) and dependencies to an web server.
You can try.
$ cd [ionic project]
$ ionic platform add browser
$ cd [ionic project]/platforms/browser/
and move your www folder to your server [webapp] folder.
In your server:
1.Install Node.js
Install connect and serve-static
$ cd [webapp] $ npm install connect serve-static
Create server.js file
var connect = require('connect');
var serveStatic = require('serve-static');
connect().use(serveStatic(__dirname)).listen(8080)
Run serve
$ node server.js &
Now you can go to http://yourdomain:8080/index.html
I hope this can help you :)