<commit_before># sailsjs-angularjs-bootstrap-example

> A Sails.js, AngularJS, Twitter Bootstrap example application.

**Notes/Current Status** *(as of Jan 5, 2014)*

Contains a very preliminary AngularJS `Todo List` example that uses Sails REST calls through Socket.io.
Be wary, this has been hacked together over a weekend as a Sails.js/AngularJS learning project.
Do not consider this as production-ready code.

I was curious about how the socket.io connection, the comet messages, and auto-subscriptions worked in Sails
(see `TodoController` in `assets/linker/js/app.js`).
The Sails socket.io code was refactored into an Angular service that wraps the `angular-socket-io` factory
(see `assets/linker/js/angular-sails.io.js`). The retry logic may be of interest, since it first sends a `$http.get()`
request to the server for obtaining the security token cookie, otherwise you'll get the `500 error: "handshake error"`
from socket.io's automatic reconnect logic. The Todo app could use better handling during disconnects and
api errors, which is the next thing I'd like to spent time on before moving on to another example.

The Sails.js asset grunt tasks have been reconfigured to allow Twitter Bootstrap and Font Awesome custom compiles
(see `/assets/linker/styles/*.less`).
The grunt `copy` task has also been reconfigured to include other Bower-managed client-side libraries.

## Utilizes...

- [Sails.js v0.9](http://sailsjs.org/)
- [Twitter Bootstrap v3](http://getbootstrap.com/)
- [AngularJS v1.2](http://angularjs.org/)
- [Angular-UI Bootstrap](http://angular-ui.github.io/bootstrap/)
- [Font Awesome](http://fontawesome.io/)
- [Jade Templates](http://jade-lang.com/)
- [Socket.io](http://socket.io/)
- [Node.js](http://nodejs.org/api/)<commit_msg>Readme update<commit_after># sailsjs-angularjs-bootstrap-example

> A Sails.js, AngularJS, Twitter Bootstrap example application.

**Notes/Current Status** *(as of Jan 5, 2014)*

Contains a very preliminary AngularJS `Todo List` example that uses Sails REST calls through Socket.io.
Be wary, this has been hacked together over a weekend as a Sails.js/AngularJS learning project.
Do not consider this as production-ready code.

I was curious about how the socket.io connection, the comet messages, and auto-subscriptions worked in Sails
(see `TodoController` in `assets/linker/js/app.js`).
The Sails socket.io code was refactored into an Angular service that wraps the `angular-socket-io` factory
(see `assets/linker/js/angular-sails.io.js`). The retry logic may be of interest, since it first sends a `$http.get()`
request to the server for obtaining the security token cookie, otherwise you'll get the `500 error: "handshake error"`
from socket.io's automatic reconnect logic. The Todo app could use better handling during disconnects and
api errors, which is the next thing I'd like to spent time on before moving on to another example.

The Sails.js asset grunt tasks have been reconfigured to allow Twitter Bootstrap and Font Awesome custom compiles
(see `/assets/linker/styles/*.less`).
The grunt `copy` task has also been reconfigured to include other Bower-managed client-side libraries.

This other repo may also be of interest, though it uses Sails v0.8:
[levid/angular-sails-socketio-mongo-demo](https://github.com/levid/angular-sails-socketio-mongo-demo)


## Utilizes...

- [Sails.js v0.9](http://sailsjs.org/)
- [Twitter Bootstrap v3](http://getbootstrap.com/)
- [AngularJS v1.2](http://angularjs.org/)
- [Angular-UI Bootstrap](http://angular-ui.github.io/bootstrap/)
- [Font Awesome](http://fontawesome.io/)
- [Jade Templates](http://jade-lang.com/)
- [Socket.io](http://socket.io/)
- [Node.js](http://nodejs.org/api/)
{'fraction_non_alphanumeric': 0.11213434452871072, 'fraction_numerical': 0.007583965330444204, 'mean_word_length': 4.520179372197309, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '550943', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1081, 'n_words': 422}