Closed adriatic closed 9 years ago
Good questions but the thing is that this isn't really related to Aurelia itself but more a general way to develop node applications. So most of those information are available when looking for Node tutorials etc. Nevertheless lets give it a try:
Reg. bin/install (without .js extension)
things stored in the bin folder are treated as executables, which you'd e.g. give execute permissions on linux. So whatever is in there may be started via node bin/name
or shorter bin/name
. Take a look here http://liangzan.net/blog/blog/2012/07/30/how-to-write-a-command-line-application-in-node-dot-js/
Reg. root app.js You are free to name your node apps entry file whatever you like, but a general approach is to name it app.js or index.js
Reg. public app.js as initial root Now this here is specific to ExpressJS, the library used for routing. To get detailed information please visit http://expressjs.com/ In short, in order to make the public app start by default this example performs an automatic redirect on initial startup as seen here https://github.com/zewa666/aurelia-node/blob/master/routes/api.js#L9-L11
Final remarks: this example is not targeting anyone in specific but shared as a general example for whoever needs it. It's not an official Aurelia repository nor the only way Aurelia recommends to do it. In fact there are some other implementations out there in the wild. The reason I've created this is that a lot of people started asking how to create a starting app with node + aurelia. So this should help you get running and focusing on Aurelia instead of how to setup node apps.
I'm going to close this one, if there is more needed we can reopen this again
I cloned this repository on my (Windows) machine, and did everything that README.md files tells me to do. No hiccups, everything went completely smooth - and as a consequence I got the well known Aurelia Navigation Skeleton running.
Only then I checked the actual code and discovered several gems:
index.html
having the sectionI also have a question: How is it achieved that the
public/app/index.html
gets processed when node runs theapp.js
My final feedback: many aspects of this repository need to be explained to the benefit of others (folks who are not members of the core team, since if core team members are targeted "audience", I see no need for any documentation at all. :-)