├── ngClient ├── .gitignore ├── libs │ ├── jquery │ │ ├── src │ │ │ ├── outro.js │ │ │ ├── selector.js │ │ │ ├── var │ │ │ │ ├── arr.js │ │ │ │ ├── rnotwhite.js │ │ │ │ ├── strundefined.js │ │ │ │ ├── push.js │ │ │ │ ├── class2type.js │ │ │ │ ├── concat.js │ │ │ │ ├── indexOf.js │ │ │ │ ├── slice.js │ │ │ │ ├── pnum.js │ │ │ │ ├── toString.js │ │ │ │ ├── hasOwn.js │ │ │ │ └── support.js │ │ │ ├── ajax │ │ │ │ ├── var │ │ │ │ │ ├── rquery.js │ │ │ │ │ └── nonce.js │ │ │ │ ├── parseJSON.js │ │ │ │ ├── parseXML.js │ │ │ │ ├── script.js │ │ │ │ ├── load.js │ │ │ │ ├── jsonp.js │ │ │ │ └── xhr.js │ │ │ ├── css │ │ │ │ ├── var │ │ │ │ │ ├── rmargin.js │ │ │ │ │ ├── cssExpand.js │ │ │ │ │ ├── rnumnonpx.js │ │ │ │ │ ├── getStyles.js │ │ │ │ │ └── isHidden.js │ │ │ │ ├── hiddenVisibleSelectors.js │ │ │ │ ├── swap.js │ │ │ │ ├── addGetHookIf.js │ │ │ │ ├── curCSS.js │ │ │ │ ├── defaultDisplay.js │ │ │ │ └── support.js │ │ │ ├── data │ │ │ │ ├── var │ │ │ │ │ ├── data_priv.js │ │ │ │ │ └── data_user.js │ │ │ │ └── accepts.js │ │ │ ├── manipulation │ │ │ │ ├── var │ │ │ │ │ └── rcheckableType.js │ │ │ │ ├── _evalUrl.js │ │ │ │ └── support.js │ │ │ ├── core │ │ │ │ ├── var │ │ │ │ │ └── rsingleTag.js │ │ │ │ ├── parseHTML.js │ │ │ │ ├── access.js │ │ │ │ ├── ready.js │ │ │ │ └── init.js │ │ │ ├── traversing │ │ │ │ ├── var │ │ │ │ │ └── rneedsContext.js │ │ │ │ └── findFilter.js │ │ │ ├── event │ │ │ │ ├── support.js │ │ │ │ └── alias.js │ │ │ ├── attributes.js │ │ │ ├── deprecated.js │ │ │ ├── effects │ │ │ │ ├── animatedSelector.js │ │ │ │ └── Tween.js │ │ │ ├── selector-sizzle.js │ │ │ ├── queue │ │ │ │ └── delay.js │ │ │ ├── jquery.js │ │ │ ├── exports │ │ │ │ ├── global.js │ │ │ │ └── amd.js │ │ │ ├── attributes │ │ │ │ ├── support.js │ │ │ │ ├── prop.js │ │ │ │ └── attr.js │ │ │ ├── intro.js │ │ │ ├── wrap.js │ │ │ ├── dimensions.js │ │ │ ├── serialize.js │ │ │ └── queue.js │ │ ├── bower.json │ │ ├── .bower.json │ │ └── MIT-LICENSE.txt │ ├── angular │ │ ├── angular.min.js.gzip │ │ ├── bower.json │ │ ├── .bower.json │ │ ├── angular-csp.css │ │ └── README.md │ ├── bootstrap │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── dist │ │ │ └── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── less │ │ │ ├── mixins │ │ │ │ ├── center-block.less │ │ │ │ ├── text-emphasis.less │ │ │ │ ├── size.less │ │ │ │ ├── opacity.less │ │ │ │ ├── background-variant.less │ │ │ │ ├── text-overflow.less │ │ │ │ ├── tab-focus.less │ │ │ │ ├── resize.less │ │ │ │ ├── labels.less │ │ │ │ ├── progress-bar.less │ │ │ │ ├── reset-filter.less │ │ │ │ ├── nav-divider.less │ │ │ │ ├── alerts.less │ │ │ │ ├── nav-vertical-align.less │ │ │ │ ├── responsive-visibility.less │ │ │ │ ├── pagination.less │ │ │ │ ├── border-radius.less │ │ │ │ ├── panels.less │ │ │ │ ├── list-group.less │ │ │ │ ├── hide-text.less │ │ │ │ ├── clearfix.less │ │ │ │ ├── table-row.less │ │ │ │ ├── image.less │ │ │ │ ├── buttons.less │ │ │ │ ├── forms.less │ │ │ │ ├── grid-framework.less │ │ │ │ └── grid.less │ │ │ ├── wells.less │ │ │ ├── breadcrumbs.less │ │ │ ├── responsive-embed.less │ │ │ ├── component-animations.less │ │ │ ├── close.less │ │ │ ├── thumbnails.less │ │ │ ├── utilities.less │ │ │ ├── media.less │ │ │ ├── pager.less │ │ │ ├── jumbotron.less │ │ │ ├── mixins.less │ │ │ ├── badges.less │ │ │ ├── bootstrap.less │ │ │ ├── labels.less │ │ │ ├── code.less │ │ │ ├── grid.less │ │ │ ├── alerts.less │ │ │ ├── print.less │ │ │ ├── pagination.less │ │ │ ├── progress-bars.less │ │ │ ├── tooltip.less │ │ │ ├── scaffolding.less │ │ │ ├── list-group.less │ │ │ ├── popovers.less │ │ │ ├── buttons.less │ │ │ └── modals.less │ │ ├── bower.json │ │ ├── LICENSE │ │ ├── .bower.json │ │ ├── grunt │ │ │ ├── bs-glyphicons-data-generator.js │ │ │ ├── bs-raw-files-generator.js │ │ │ └── sauce_browsers.yml │ │ ├── js │ │ │ ├── transition.js │ │ │ ├── alert.js │ │ │ ├── button.js │ │ │ ├── tab.js │ │ │ └── popover.js │ │ └── package.json │ └── angular-route │ │ ├── bower.json │ │ ├── .bower.json │ │ ├── README.md │ │ └── angular-route.min.js ├── .bowerrc ├── js │ ├── filters.js │ ├── directives.js │ ├── factory.js │ ├── controllers.js │ ├── auth │ │ ├── auth.controller.js │ │ └── auth.factory.js │ └── app.js ├── partials │ ├── footer.html │ ├── page1.html │ ├── page2.html │ ├── login.html │ ├── page3.html │ ├── home.html │ └── header.html ├── package.json ├── bower.json ├── gulpfile.js ├── css │ └── app.css └── index.html ├── server ├── .gitignore ├── config │ └── secret.js ├── package.json ├── routes │ ├── users.js │ ├── products.js │ ├── index.js │ └── auth.js ├── server.js └── middlewares │ └── validateRequest.js └── README.md /ngClient/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /server/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/outro.js: -------------------------------------------------------------------------------- 1 | })); 2 | -------------------------------------------------------------------------------- /ngClient/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory" : "libs" 3 | } 4 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/selector.js: -------------------------------------------------------------------------------- 1 | define([ "./selector-sizzle" ]); 2 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/arr.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return []; 3 | }); 4 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/ajax/var/rquery.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return (/\?/); 3 | }); 4 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/rnotwhite.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return (/\S+/g); 3 | }); 4 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/css/var/rmargin.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return (/^margin/); 3 | }); 4 | -------------------------------------------------------------------------------- /server/config/secret.js: -------------------------------------------------------------------------------- 1 | module.exports = function() { 2 | return 'super.super.secret.shhh'; 3 | } 4 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/strundefined.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return typeof undefined; 3 | }); 4 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/push.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./arr" 3 | ], function( arr ) { 4 | return arr.push; 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/class2type.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | // [[Class]] -> type pairs 3 | return {}; 4 | }); 5 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/concat.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./arr" 3 | ], function( arr ) { 4 | return arr.concat; 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/indexOf.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./arr" 3 | ], function( arr ) { 4 | return arr.indexOf; 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/slice.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./arr" 3 | ], function( arr ) { 4 | return arr.slice; 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/css/var/cssExpand.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return [ "Top", "Right", "Bottom", "Left" ]; 3 | }); 4 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/pnum.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; 3 | }); 4 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/data/var/data_priv.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../Data" 3 | ], function( Data ) { 4 | return new Data(); 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/data/var/data_user.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../Data" 3 | ], function( Data ) { 4 | return new Data(); 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/manipulation/var/rcheckableType.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return (/^(?:checkbox|radio)$/i); 3 | }); 4 | -------------------------------------------------------------------------------- /ngClient/libs/angular/angular.min.js.gzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/myRESTApp/HEAD/ngClient/libs/angular/angular.min.js.gzip -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/ajax/var/nonce.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../../core" 3 | ], function( jQuery ) { 4 | return jQuery.now(); 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/toString.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./class2type" 3 | ], function( class2type ) { 4 | return class2type.toString; 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/hasOwn.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./class2type" 3 | ], function( class2type ) { 4 | return class2type.hasOwnProperty; 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/angular/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.2.25", 4 | "main": "./angular.js", 5 | "dependencies": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/core/var/rsingleTag.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | // Match a standalone tag 3 | return (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); 4 | }); 5 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/var/support.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | // All support tests are defined in their respective modules. 3 | return {}; 4 | }); 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | myRESTApp 2 | ========= 3 | 4 | [Architecting a Secure RESTful Node.js app](http://thejackalofjavascript.com/architecting-a-restful-node-js-app) 5 | 6 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/css/var/rnumnonpx.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../../var/pnum" 3 | ], function( pnum ) { 4 | return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/myRESTApp/HEAD/ngClient/libs/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/myRESTApp/HEAD/ngClient/libs/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/myRESTApp/HEAD/ngClient/libs/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/myRESTApp/HEAD/ngClient/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/myRESTApp/HEAD/ngClient/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/myRESTApp/HEAD/ngClient/libs/bootstrap/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/css/var/getStyles.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return function( elem ) { 3 | return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); 4 | }; 5 | }); 6 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/traversing/var/rneedsContext.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../../core", 3 | "../../selector" 4 | ], function( jQuery ) { 5 | return jQuery.expr.match.needsContext; 6 | }); 7 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/text-emphasis.less: -------------------------------------------------------------------------------- 1 | // Typography 2 | 3 | .text-emphasis-variant(@color) { 4 | color: @color; 5 | a&:hover { 6 | color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ngClient/libs/angular-route/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-route", 3 | "version": "1.2.25", 4 | "main": "./angular-route.js", 5 | "dependencies": { 6 | "angular": "1.2.25" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/event/support.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../var/support" 3 | ], function( support ) { 4 | 5 | support.focusinBubbles = "onfocusin" in window; 6 | 7 | return support; 8 | 9 | }); 10 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/size.less: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | .size(@width; @height) { 4 | width: @width; 5 | height: @height; 6 | } 7 | 8 | .square(@size) { 9 | .size(@size; @size); 10 | } 11 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/opacity.less: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | .opacity(@opacity) { 4 | opacity: @opacity; 5 | // IE8 filter 6 | @opacity-ie: (@opacity * 100); 7 | filter: ~"alpha(opacity=@{opacity-ie})"; 8 | } 9 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover { 6 | background-color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/text-overflow.less: -------------------------------------------------------------------------------- 1 | // Text overflow 2 | // Requires inline-block or block for proper styling 3 | 4 | .text-overflow() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/tab-focus.less: -------------------------------------------------------------------------------- 1 | // WebKit-style focus 2 | 3 | .tab-focus() { 4 | // Default 5 | outline: thin dotted; 6 | // WebKit 7 | outline: 5px auto -webkit-focus-ring-color; 8 | outline-offset: -2px; 9 | } 10 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/resize.less: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | .resizable(@direction) { 4 | resize: @direction; // Options: horizontal, vertical, both 5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 6 | } 7 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/labels.less: -------------------------------------------------------------------------------- 1 | // Labels 2 | 3 | .label-variant(@color) { 4 | background-color: @color; 5 | 6 | &[href] { 7 | &:hover, 8 | &:focus { 9 | background-color: darken(@color, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ngClient/js/filters.js: -------------------------------------------------------------------------------- 1 | myApp.filter('checkmark', function() { 2 | /** https://docs.angularjs.org/guide/filter **/ 3 | 4 | var filterFunction = function(input) { 5 | return input ? '\u2713' : '\u2718'; 6 | }; 7 | 8 | return filterFunction; 9 | }); 10 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/progress-bar.less: -------------------------------------------------------------------------------- 1 | // Progress bars 2 | 3 | .progress-bar-variant(@color) { 4 | background-color: @color; 5 | 6 | // Deprecated parent class requirement as of v3.2.0 7 | .progress-striped & { 8 | #gradient > .striped(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/attributes.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./core", 3 | "./attributes/attr", 4 | "./attributes/prop", 5 | "./attributes/classes", 6 | "./attributes/val" 7 | ], function( jQuery ) { 8 | 9 | // Return jQuery for attributes-only inclusion 10 | return jQuery; 11 | }); 12 | -------------------------------------------------------------------------------- /ngClient/partials/footer.html: -------------------------------------------------------------------------------- 1 |
8 | -------------------------------------------------------------------------------- /ngClient/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngclient", 3 | "version": "0.1.0", 4 | "dependencies": { 5 | "bower": "^1.3.9", 6 | "gulp": "^3.8.7", 7 | "gulp-connect": "^2.0.6" 8 | }, 9 | "scripts": { 10 | "postinstall": "./node_modules/bower/bin/bower install" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/deprecated.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./core", 3 | "./traversing" 4 | ], function( jQuery ) { 5 | 6 | // The number of elements contained in the matched element set 7 | jQuery.fn.size = function() { 8 | return this.length; 9 | }; 10 | 11 | jQuery.fn.andSelf = jQuery.fn.addBack; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /ngClient/libs/bootstrap/less/mixins/reset-filter.less: -------------------------------------------------------------------------------- 1 | // Reset filters for IE 2 | // 3 | // When you need to remove a gradient background, do not forget to use this to reset 4 | // the IE filter for IE9 and below. 5 | 6 | .reset-filter() { 7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 8 | } 9 | -------------------------------------------------------------------------------- /ngClient/libs/jquery/src/ajax/parseJSON.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | // Support: Android 2.3 6 | // Workaround failure to string-cast null input 7 | jQuery.parseJSON = function( data ) { 8 | return JSON.parse( data + "" ); 9 | }; 10 | 11 | return jQuery.parseJSON; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /ngClient/partials/page1.html: -------------------------------------------------------------------------------- 1 | Demo a simple directive
7 | <print-this/>
8 |
Demo a simple filter
7 | checkmark
8 |
11 |
/api/v1/products
5 | 10 |
| ID | 13 |Name | 14 |
|---|---|
| {{p.id}} | 17 |{{p.name}} | 18 |
This app is scaffolded by
8 | slush-ng
This app uses Bootstrap for styling. If you are looking to add functional Bootstrap components, refer UI Bootstrap.
11 |
This app is baked in with 14 |
This app comes integrated with
21 | angular-route,
22 | controllers, a sample
23 | directive and a sample
24 | filter
25 |
This app also has a sample factory layer, that can be used to interact with RESTful services (includes an example too).