I have started working on a role-playing campaign and character manager called game binder. I am using this as a way to learn Angularjs, Nodejs and Mongodb.
I spent the last 4 hours trying to get the Nodejs server running without jade. The reason for this is that I didn’t want to write authentication and user creation processes as those already exist in Nodejs via passport. Frederik Nakstad also wrote a nice example app that performs authentication and permissions using Angularjs and Nodejs. See fnakstad’s github repository.
The problem in my mind with the app is it uses jade as the templating engine. I didn’t see the need for jade with Angularjs, it made the code more confusing than straight HTML. I also read that jade is slower than a bunch of other template engines. The ect templating engine is supposedly the fastest engine. My problem then became modifying Fredrik’s code to work with ect. The structure for the app is as follows:
Below is the server.js file that works with the ect template engine and angular with the structure above.
Below is the server/routes.js file that I think I stripped down to be the basics that would be needed to run Angularjs with the above server.js file and the structure.
Below is the package.json file that should be all that is needed to install the right components.