Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Serve an Aurelia.io app without using Gulp watch

How do you run an Aurelia app without running gulp watch and just going to localhost:9000. Ideally I would like to just run my nodejs server and it all just works without having to run a separate task (a gulp task).

I would like to build Aurelia and just start using it in the same way that I can with Durandal.

like image 633
RyanKeeter Avatar asked Feb 17 '15 16:02

RyanKeeter


1 Answers

take a look at the Aurelia-Node Repo for a quick start. It uses ExpressJS to provide a simple REST api as well as static serve the Aurelia App.

You'd still need the Gulp task (inside public/app) to build your es6 modules etc. but the hosting then works from node itself, so gulp build should be enough.

EDIT: The repo provides a gulpfile in the root as well. The big difference using this one is that it not only transpiles the frontend code but also browserSyncs the node application via nodemon. Again all of this is not necessary for final hosting. A normal node app.js would be enough. Gulp etc. is just used during the development process.

like image 167
zewa666 Avatar answered Jan 02 '23 18:01

zewa666