Search code examples
wordpressapacheaurelia

Can I bundle and migrate a standalone Aurelia App that can run on apache server without node.js?


First of I am new to Aurelia and has just completed a real world project on my development server which I like to run concurrently with WordPress which needs PHP. Back in the days with angular 1.x I used to gulp all the angular dependencies and scripts into a single file and transfer it to the server, which I thought would be the case with Aurelia too but looks like it is more complex in this matter. So please if any one has come around to this problem, any help would be appericated like how can I port Aurelia project to apache server without serving it through node. Or is it possible to run node and apache on same server.


Solution

  • You don't need to run Node to serve your application. Any web server - such as Apache - will do. You only need to bundle your application and upload the files to your server.

    If your project was created using the CLI, the application is bundled automatically every time you run au run (or au build), so you can simply upload the scripts directory and the index.html file. This is the minimum; you may need to upload also CSS, images or fonts, depending on your app.

    If your project is based on one of the skeletons, you can bundle your app by running gulp bundle, then upload the distdirectory, the jspm_packages directory, the config.js file and the index.html file, plus anny other asset (CSS, images, etc.) you may need.