├── .gitignore ├── .nvmrc ├── README.md ├── gulp.config.js ├── gulpTasks ├── clean.js ├── compile.js ├── copy.js ├── dev.js ├── index.js ├── less.js └── liveReload.js ├── gulpfile.js ├── package.json ├── presentations ├── 2016-presentation-basta-spring │ ├── _assets │ │ ├── generic-web-api.graffle │ │ └── node-js-server.graffle │ ├── css │ │ ├── print │ │ │ ├── paper.css │ │ │ └── pdf.css │ │ ├── reveal.css │ │ ├── reveal.scss │ │ └── theme │ │ │ ├── README.md │ │ │ ├── beige.css │ │ │ ├── black.css │ │ │ ├── blood.css │ │ │ ├── league.css │ │ │ ├── moon.css │ │ │ ├── night.css │ │ │ ├── serif.css │ │ │ ├── simple.css │ │ │ ├── sky.css │ │ │ ├── solarized.css │ │ │ ├── source │ │ │ ├── beige.scss │ │ │ ├── black.scss │ │ │ ├── blood.scss │ │ │ ├── league.scss │ │ │ ├── moon.scss │ │ │ ├── night.scss │ │ │ ├── serif.scss │ │ │ ├── simple.scss │ │ │ ├── sky.scss │ │ │ ├── solarized.scss │ │ │ └── white.scss │ │ │ ├── template │ │ │ ├── mixins.scss │ │ │ ├── settings.scss │ │ │ └── theme.scss │ │ │ └── white.css │ ├── images │ │ ├── basta-spring-background.png │ │ ├── basta-spring-footer.png │ │ ├── crossplatformmagazine.png │ │ ├── cw.png │ │ ├── generic-web-api.png │ │ ├── mr.png │ │ ├── node-js-server.png │ │ └── ttLogo.png │ ├── index.html │ ├── js │ │ └── reveal.js │ ├── lib │ │ ├── css │ │ │ └── zenburn.css │ │ ├── font │ │ │ ├── league-gothic │ │ │ │ ├── LICENSE │ │ │ │ ├── league-gothic.css │ │ │ │ ├── league-gothic.eot │ │ │ │ ├── league-gothic.ttf │ │ │ │ └── league-gothic.woff │ │ │ └── source-sans-pro │ │ │ │ ├── LICENSE │ │ │ │ ├── source-sans-pro-italic.eot │ │ │ │ ├── source-sans-pro-italic.ttf │ │ │ │ ├── source-sans-pro-italic.woff │ │ │ │ ├── source-sans-pro-regular.eot │ │ │ │ ├── source-sans-pro-regular.ttf │ │ │ │ ├── source-sans-pro-regular.woff │ │ │ │ ├── source-sans-pro-semibold.eot │ │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ │ ├── source-sans-pro-semibold.woff │ │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ │ └── source-sans-pro.css │ │ └── js │ │ │ ├── classList.js │ │ │ ├── head.min.js │ │ │ └── html5shiv.js │ └── plugin │ │ ├── highlight │ │ └── highlight.js │ │ ├── leap │ │ └── leap.js │ │ ├── markdown │ │ ├── example.html │ │ ├── example.md │ │ ├── markdown.js │ │ └── marked.js │ │ ├── math │ │ └── math.js │ │ ├── multiplex │ │ ├── client.js │ │ ├── index.js │ │ └── master.js │ │ ├── notes-server │ │ ├── client.js │ │ ├── index.js │ │ └── notes.html │ │ ├── notes │ │ ├── notes.html │ │ └── notes.js │ │ ├── print-pdf │ │ └── print-pdf.js │ │ ├── remotes │ │ └── remotes.js │ │ ├── search │ │ └── search.js │ │ └── zoom-js │ │ └── zoom.js └── 2016-presentation_ug-ka │ ├── _assets │ ├── generic-web-api.graffle │ └── node-js-server.graffle │ ├── css │ ├── print │ │ ├── paper.css │ │ └── pdf.css │ ├── reveal.css │ ├── reveal.scss │ └── theme │ │ ├── README.md │ │ ├── beige.css │ │ ├── black.css │ │ ├── blood.css │ │ ├── league.css │ │ ├── moon.css │ │ ├── night.css │ │ ├── serif.css │ │ ├── simple.css │ │ ├── sky.css │ │ ├── solarized.css │ │ ├── source │ │ ├── beige.scss │ │ ├── black.scss │ │ ├── blood.scss │ │ ├── league.scss │ │ ├── moon.scss │ │ ├── night.scss │ │ ├── serif.scss │ │ ├── simple.scss │ │ ├── sky.scss │ │ ├── solarized.scss │ │ └── white.scss │ │ ├── template │ │ ├── mixins.scss │ │ ├── settings.scss │ │ └── theme.scss │ │ └── white.css │ ├── images │ ├── generic-web-api.png │ ├── mr.png │ ├── node-js-server.png │ └── ttLogo.png │ ├── index.html │ ├── js │ └── reveal.js │ ├── lib │ ├── css │ │ └── zenburn.css │ ├── font │ │ ├── league-gothic │ │ │ ├── LICENSE │ │ │ ├── league-gothic.css │ │ │ ├── league-gothic.eot │ │ │ ├── league-gothic.ttf │ │ │ └── league-gothic.woff │ │ └── source-sans-pro │ │ │ ├── LICENSE │ │ │ ├── source-sans-pro-italic.eot │ │ │ ├── source-sans-pro-italic.ttf │ │ │ ├── source-sans-pro-italic.woff │ │ │ ├── source-sans-pro-regular.eot │ │ │ ├── source-sans-pro-regular.ttf │ │ │ ├── source-sans-pro-regular.woff │ │ │ ├── source-sans-pro-semibold.eot │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ ├── source-sans-pro-semibold.woff │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ └── source-sans-pro.css │ └── js │ │ ├── classList.js │ │ ├── head.min.js │ │ └── html5shiv.js │ └── plugin │ ├── highlight │ └── highlight.js │ ├── leap │ └── leap.js │ ├── markdown │ ├── example.html │ ├── example.md │ ├── markdown.js │ └── marked.js │ ├── math │ └── math.js │ ├── multiplex │ ├── client.js │ ├── index.js │ └── master.js │ ├── notes-server │ ├── client.js │ ├── index.js │ └── notes.html │ ├── notes │ ├── notes.html │ └── notes.js │ ├── print-pdf │ └── print-pdf.js │ ├── remotes │ └── remotes.js │ ├── search │ └── search.js │ └── zoom-js │ └── zoom.js ├── src ├── aspNetCore │ ├── STS │ │ ├── Dockerfile │ │ ├── IdentityServerConfiguration │ │ │ ├── Clients.cs │ │ │ ├── Scopes.cs │ │ │ └── Users.cs │ │ ├── Startup.cs │ │ ├── appsettings.json │ │ └── project.json │ └── WebAPI │ │ ├── Controllers │ │ └── Customer.cs │ │ ├── Database │ │ └── CustomerContext.cs │ │ ├── Dockerfile │ │ ├── Models │ │ └── CustomerModel.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Services │ │ ├── DatabaseCustomerService.cs │ │ ├── ICustomerService.cs │ │ └── InMemoryCustomerService.cs │ │ ├── Startup.cs │ │ ├── appsettings.json │ │ └── project.json ├── ng2client │ ├── app │ │ ├── boot.ts │ │ ├── components │ │ │ ├── adminArea │ │ │ │ ├── adminArea.html │ │ │ │ └── adminArea.ts │ │ │ ├── adminCustomerCreate │ │ │ │ ├── adminCustomerCreate.html │ │ │ │ └── adminCustomerCreate.ts │ │ │ ├── adminCustomerList │ │ │ │ ├── adminCustomerList.html │ │ │ │ └── adminCustomerList.ts │ │ │ ├── adminHome │ │ │ │ ├── adminHome.html │ │ │ │ └── adminHome.ts │ │ │ ├── app │ │ │ │ ├── app.html │ │ │ │ └── app.ts │ │ │ ├── login │ │ │ │ ├── login.html │ │ │ │ └── login.ts │ │ │ └── navigation │ │ │ │ ├── navigation.html │ │ │ │ └── navigation.ts │ │ ├── model │ │ │ └── customerModel.ts │ │ └── services │ │ │ ├── customerApiService.ts │ │ │ ├── securityService.ts │ │ │ ├── services.ts │ │ │ └── urlService.ts │ ├── index.html │ ├── less │ │ ├── _mixins.less │ │ └── main.less │ └── vendor │ │ └── flakes │ │ └── all.css └── nodejs │ ├── STS │ ├── index.js │ └── server │ │ ├── index.js │ │ └── oAuthModel.js │ └── WebAPI │ ├── config │ └── index.js │ ├── controllers │ ├── customer.js │ └── index.js │ ├── database │ ├── mongo │ │ ├── customerModel.js │ │ └── index.js │ └── postgres │ │ ├── customerModel.js │ │ └── index.js │ ├── index.js │ ├── public │ └── docs │ │ ├── css │ │ ├── print.css │ │ ├── reset.css │ │ ├── screen.css │ │ ├── style.css │ │ └── typography.css │ │ ├── fonts │ │ ├── DroidSans-Bold.ttf │ │ └── DroidSans.ttf │ │ ├── images │ │ ├── collapse.gif │ │ ├── expand.gif │ │ ├── explorer_icons.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── logo_small.png │ │ ├── pet_store_api.png │ │ ├── throbber.gif │ │ └── wordnik_api.png │ │ ├── index.html │ │ ├── lang │ │ ├── en.js │ │ ├── es.js │ │ ├── fr.js │ │ ├── it.js │ │ ├── ja.js │ │ ├── pl.js │ │ ├── pt.js │ │ ├── ru.js │ │ ├── tr.js │ │ ├── translator.js │ │ └── zh-cn.js │ │ ├── lib │ │ ├── backbone-min.js │ │ ├── handlebars-2.0.0.js │ │ ├── highlight.7.3.pack.js │ │ ├── jquery-1.8.0.min.js │ │ ├── jquery.ba-bbq.min.js │ │ ├── jquery.slideto.min.js │ │ ├── jquery.wiggle.min.js │ │ ├── jsoneditor.min.js │ │ ├── marked.js │ │ ├── swagger-oauth.js │ │ ├── underscore-min.js │ │ └── underscore-min.map │ │ ├── o2c.html │ │ ├── swagger-ui.js │ │ └── swagger-ui.min.js │ ├── server │ ├── index.js │ └── referenceTokenValidation.js │ └── service │ ├── customer.inmemory.js │ ├── customer.mongo.js │ ├── customer.postgres.js │ └── index.js ├── tsConfig.json └── typings.json /.nvmrc: -------------------------------------------------------------------------------- 1 | v5 2 | -------------------------------------------------------------------------------- /gulp.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | 5 | module.exports = { 6 | tsConfigFile: 'tsConfig.json', 7 | buildFolders: { 8 | root: 'build', 9 | vendor: path.join('build', 'vendor'), 10 | css: path.join('build', 'css'), 11 | asset: path.join('build', 'assets') 12 | }, 13 | sourceFolder: path.join('src', 'ng2client'), 14 | source: { 15 | index: path.join('src', 'ng2client', 'index.html'), 16 | tsFiles: path.join('src', 'ng2client', '**', '*.ts') , 17 | // Only the injectable js files are relevant here. But NOT the app files, since SystemJS will load them. 18 | jsFiles: [ 19 | path.join('build', 'vendor', 'es6-shim.js'), 20 | path.join('build', 'vendor', 'system-polyfills.js'), 21 | path.join('build', 'vendor', 'angular2-polyfills.js'), 22 | path.join('build', 'vendor', 'system.src.js'), 23 | path.join('build', 'vendor', 'Rx.js'), 24 | path.join('build', 'vendor', 'angular2.dev.js'), 25 | path.join('build', 'vendor', 'http.dev.js'), 26 | path.join('build', 'vendor', 'router.dev.js'), 27 | path.join('build', 'vendor', '**', '*.js') 28 | // Uncommenting the following line will create an "Unexpected anonymous System.register call" error when the apps runs 29 | //'build/app/**/*.js' 30 | ], 31 | assetFiles: path.join('src', 'ng2client', 'assets', '**', '*.*'), 32 | vendorCssFiles: path.join('src', 'ng2client', 'vendor', '**', '*.css'), 33 | vendorJsFiles: path.join('src', 'ng2client', 'vendor', '**', '*.js'), 34 | cssFiles: [ 35 | path.join('build', 'css', 'flakes', '*.css'), 36 | path.join('build', 'css', '**', '*.css') 37 | ], 38 | lessFiles: [ 39 | path.join('src', 'ng2client', 'less', 'main.less') 40 | ], 41 | htmlFiles: [ 42 | path.join('src', 'ng2client', '**', '*.html'), 43 | '!' + path.join('src', 'ng2client', 'index.html') 44 | ], 45 | angular2: [ 46 | path.join('node_modules', 'angular2', 'bundles', 'angular2-polyfills.js'), 47 | path.join('node_modules', 'systemjs', 'dist', 'system.src.js'), 48 | path.join('node_modules', 'systemjs', 'dist', 'system-polyfills.js'), 49 | path.join('node_modules', 'rxjs', 'bundles', 'Rx.js'), 50 | path.join('node_modules', 'es6-shim', 'es6-shim.js'), 51 | path.join('node_modules', 'angular2', 'bundles', 'angular2.dev.js'), 52 | path.join('node_modules', 'angular2', 'bundles', 'http.dev.js'), 53 | path.join('node_modules', 'angular2', 'bundles', 'router.dev.js') 54 | ] 55 | }, 56 | autoprefixerBrowsers: ['Chrome >= 43', 'last 2 versions'] 57 | }; 58 | -------------------------------------------------------------------------------- /gulpTasks/clean.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const gulp = require('gulp'), 4 | del = require('del'), 5 | path = require('path'), 6 | buildConfig = require('../gulp.config'); 7 | 8 | gulp.task('clean:build', () => { 9 | return del(path.join(buildConfig.buildFolders.root, '**')); 10 | }); 11 | -------------------------------------------------------------------------------- /gulpTasks/compile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const gulp = require('gulp'), 4 | ts = require('gulp-typescript'), 5 | sourcemaps = require('gulp-sourcemaps'), 6 | buildConfig = require('../gulp.config'); 7 | 8 | const tsProject = ts.createProject(buildConfig.tsConfigFile, { 9 | // Use the latest version of typescript 10 | typescript: require('typescript') 11 | }); 12 | 13 | const compileSource = withSourceMaps => { 14 | let gulpSrc = gulp.src(buildConfig.source.tsFiles); 15 | 16 | if (withSourceMaps) { 17 | gulpSrc = gulpSrc.pipe(sourcemaps.init()); 18 | } 19 | 20 | gulpSrc = gulpSrc.pipe(ts(tsProject)); 21 | 22 | if (withSourceMaps) { 23 | gulpSrc = gulpSrc.pipe(sourcemaps.write('.')); 24 | } 25 | 26 | gulpSrc = gulpSrc.pipe(gulp.dest(buildConfig.buildFolders.root)); 27 | 28 | return gulpSrc; 29 | }; 30 | 31 | gulp.task('compile', () => { 32 | return compileSource(); 33 | }); 34 | 35 | gulp.task('compile:withSourceMaps', () => { 36 | return compileSource(true); 37 | }); 38 | -------------------------------------------------------------------------------- /gulpTasks/copy.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const gulp = require('gulp'), 4 | buildConfig = require('../gulp.config'); 5 | 6 | gulp.task('copy:angular2', () => { 7 | return gulp.src(buildConfig.source.angular2) 8 | .pipe(gulp.dest(buildConfig.buildFolders.vendor)); 9 | }); 10 | 11 | gulp.task('copy:html', () => { 12 | return gulp.src(buildConfig.source.htmlFiles) 13 | .pipe(gulp.dest(buildConfig.buildFolders.root)); 14 | }); 15 | 16 | gulp.task('copy:vendor-css', () => { 17 | return gulp.src(buildConfig.source.vendorCssFiles) 18 | .pipe(gulp.dest(buildConfig.buildFolders.css)); 19 | }); 20 | 21 | gulp.task('copy:vendor-js', () => { 22 | return gulp.src(buildConfig.source.vendorJsFiles) 23 | .pipe(gulp.dest(buildConfig.buildFolders.vendor)); 24 | }); 25 | 26 | gulp.task('copy:assets', () => { 27 | return gulp.src(buildConfig.source.assetFiles) 28 | .pipe(gulp.dest(buildConfig.buildFolders.asset)); 29 | }); 30 | -------------------------------------------------------------------------------- /gulpTasks/dev.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const gulp = require('gulp'), 4 | runSequence = require('run-sequence'); 5 | 6 | gulp.task('build:dev', done => { 7 | return runSequence( 8 | 'clean:build', 9 | 'compile:withSourceMaps', 10 | 'copy:angular2', 11 | 'copy:html', 12 | 'copy:vendor-css', 13 | 'copy:vendor-js', 14 | 'copy:assets', 15 | 'less-to-css', 16 | 'index-html', 17 | done 18 | ) 19 | }); 20 | -------------------------------------------------------------------------------- /gulpTasks/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const gulp = require('gulp'), 4 | inject = require('gulp-inject'), 5 | buildConfig = require('../gulp.config'); 6 | 7 | gulp.task('index-html', () => { 8 | let injectables = gulp.src([].concat( 9 | buildConfig.source.cssFiles, 10 | buildConfig.source.jsFiles 11 | ), { read: false }); 12 | 13 | return gulp.src(buildConfig.source.index) 14 | .pipe(inject(injectables, { 15 | addRootSlash: false, 16 | removeTags: true, 17 | ignorePath: buildConfig.buildFolders.root 18 | })) 19 | .pipe(gulp.dest(buildConfig.buildFolders.root)); 20 | }); 21 | -------------------------------------------------------------------------------- /gulpTasks/less.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const gulp = require('gulp'), 4 | less = require('gulp-less'), 5 | autoprefixer = require('gulp-autoprefixer'), 6 | buildConfig = require('../gulp.config'); 7 | 8 | gulp.task('less-to-css', () => { 9 | return gulp.src(buildConfig.source.lessFiles) 10 | .pipe(less()) 11 | .pipe(autoprefixer({ 12 | browsers: buildConfig.autoprefixerBrowsers 13 | })) 14 | .pipe(gulp.dest(buildConfig.buildFolders.css)); 15 | }); 16 | -------------------------------------------------------------------------------- /gulpTasks/liveReload.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const gulp = require('gulp'), 4 | liveServer = require('gulp-server-livereload'), 5 | runSequence = require('run-sequence'), 6 | watch = require('gulp-watch'), 7 | buildConfig = require('../gulp.config'); 8 | 9 | gulp.task('live-reload', () => { 10 | return runSequence( 11 | 'build:dev', 12 | 'live-reload:start-server', 13 | () => { 14 | deltaWatch(); 15 | } 16 | ) 17 | }); 18 | 19 | gulp.task('live-reload:start-server', function () { 20 | return gulp.src(buildConfig.buildFolders.root) 21 | .pipe(liveServer({ 22 | livereload: true, 23 | open: false 24 | })); 25 | }); 26 | 27 | function deltaWatch() { 28 | watch(buildConfig.sourceFolder, { base: buildConfig.sourceFolder }, vinyl => { 29 | if (!vinyl.event) { 30 | return; 31 | } 32 | 33 | if (vinyl.path.indexOf('.ts') > -1) { 34 | return runSequence('compile:withSourceMaps'); 35 | } 36 | 37 | if (vinyl.path.indexOf('.less') > -1) { 38 | return runSequence('less-to-css'); 39 | } 40 | 41 | if (vinyl.path.indexOf('index.html') > -1) { 42 | return runSequence('index-html'); 43 | } 44 | 45 | if (vinyl.path.indexOf('.html') > -1) { 46 | return runSequence('copy:html'); 47 | } 48 | }); 49 | } 50 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('./gulpTasks/compile'); 4 | require('./gulpTasks/clean'); 5 | require('./gulpTasks/dev'); 6 | require('./gulpTasks/index'); 7 | require('./gulpTasks/copy'); 8 | require('./gulpTasks/liveReload'); 9 | require('./gulpTasks/less'); 10 | 11 | const gulp = require('gulp'); 12 | 13 | gulp.task('watch', ['live-reload']); 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs-aspnetcore-webapi", 3 | "version": "1.0.0", 4 | "description": "Sample for creating Node.js based Web APIs compared to ASP.NET Core 1.0", 5 | "repository": { 6 | "type": "git", 7 | "url": "git+https://github.com:thinktecture/nodejs-aspnetcore-webapi.git" 8 | }, 9 | "keywords": [], 10 | "author": "Thinktecture AG (http://thinktecture.com)", 11 | "license": "ISC", 12 | "bugs": { 13 | "url": "https://github.com/thinktecture/nodejs-aspnetcore-webapi/issues" 14 | }, 15 | "scripts": { 16 | "postinstall": "typings install", 17 | "watch": "gulp watch", 18 | "typings": "typings" 19 | }, 20 | "homepage": "https://github.com/thinktecture/nodejs-aspnetcore-webapi#readme", 21 | "dependencies": { 22 | "angular2": "2.0.0-beta.6", 23 | "body-parser": "1.15.0", 24 | "bower": "1.7.7", 25 | "cors": "2.7.1", 26 | "del": "2.2.0", 27 | "es6-promise": "3.1.2", 28 | "es6-shim": "0.34.4", 29 | "express": "4.13.4", 30 | "gulp": "3.9.1", 31 | "gulp-autoprefixer": "3.1.0", 32 | "gulp-inject": "3.0.0", 33 | "gulp-less": "3.0.5", 34 | "gulp-server-livereload": "1.7.0", 35 | "gulp-sourcemaps": "1.6.0", 36 | "gulp-typescript": "2.11.0", 37 | "gulp-watch": "4.3.5", 38 | "mongoose": "4.4.6", 39 | "oauth2-server": "2.4.1", 40 | "pg": "4.4.4", 41 | "reflect-metadata": "0.1.3", 42 | "request": "2.69.0", 43 | "restify": "4.0.4", 44 | "restify-cors-middleware": "0.0.6", 45 | "run-sequence": "1.1.5", 46 | "rxjs": "5.0.0-beta.0", 47 | "sequelize": "3.19.2", 48 | "swagger-restify": "github:vellotis/swagger-restify", 49 | "systemjs": "0.19.20", 50 | "typescript": "1.7.5", 51 | "typings": "0.6.8", 52 | "zone.js": "0.5.14" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/_assets/generic-web-api.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/_assets/generic-web-api.graffle -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/_assets/node-js-server.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/_assets/node-js-server.graffle -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/README.md: -------------------------------------------------------------------------------- 1 | ## Dependencies 2 | 3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceding: https://github.com/hakimel/reveal.js#full-setup 4 | 5 | ## Creating a Theme 6 | 7 | To create your own theme, start by duplicating any ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source) and adding it to the compilation list in the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js). 8 | 9 | Each theme file does four things in the following order: 10 | 11 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)** 12 | Shared utility functions. 13 | 14 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)** 15 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3. 16 | 17 | 3. **Override** 18 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please. 19 | 20 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 21 | The template theme file which will generate final CSS output based on the currently defined variables. 22 | 23 | When you are done, run `grunt css-themes` to compile the Sass file to CSS and you are ready to use your new theme. 24 | -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/beige.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Beige theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(../../lib/font/league-gothic/league-gothic.css); 17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainColor: #333; 22 | $headingColor: #333; 23 | $headingTextShadow: none; 24 | $backgroundColor: #f7f3de; 25 | $linkColor: #8b743d; 26 | $linkColorHover: lighten( $linkColor, 20% ); 27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99); 28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 29 | 30 | // Background generator 31 | @mixin bodyBackground() { 32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); 33 | } 34 | 35 | 36 | 37 | // Theme template ------------------------------ 38 | @import "../template/theme"; 39 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/black.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 3 | * 4 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #222; 20 | 21 | $mainColor: #fff; 22 | $headingColor: #fff; 23 | 24 | $mainFontSize: 38px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #42affa; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-light-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #222; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/blood.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Blood theme for reveal.js 3 | * Author: Walther http://github.com/Walther 4 | * 5 | * Designed to be used with highlight.js theme 6 | * "monokai_sublime.css" available from 7 | * https://github.com/isagalaev/highlight.js/ 8 | * 9 | * For other themes, change $codeBackground accordingly. 10 | * 11 | */ 12 | 13 | // Default mixins and settings ----------------- 14 | @import "../template/mixins"; 15 | @import "../template/settings"; 16 | // --------------------------------------------- 17 | 18 | // Include theme-specific fonts 19 | 20 | @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic); 21 | 22 | // Colors used in the theme 23 | $blood: #a23; 24 | $coal: #222; 25 | $codeBackground: #23241f; 26 | 27 | $backgroundColor: $coal; 28 | 29 | // Main text 30 | $mainFont: Ubuntu, 'sans-serif'; 31 | $mainFontSize: 36px; 32 | $mainColor: #eee; 33 | 34 | // Headings 35 | $headingFont: Ubuntu, 'sans-serif'; 36 | $headingTextShadow: 2px 2px 2px $coal; 37 | 38 | // h1 shadow, borrowed humbly from 39 | // (c) Default theme by Hakim El Hattab 40 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 41 | 42 | // Links 43 | $linkColor: $blood; 44 | $linkColorHover: lighten( $linkColor, 20% ); 45 | 46 | // Text selection 47 | $selectionBackgroundColor: $blood; 48 | $selectionColor: #fff; 49 | 50 | 51 | // Theme template ------------------------------ 52 | @import "../template/theme"; 53 | // --------------------------------------------- 54 | 55 | // some overrides after theme template import 56 | 57 | .reveal p { 58 | font-weight: 300; 59 | text-shadow: 1px 1px $coal; 60 | } 61 | 62 | .reveal h1, 63 | .reveal h2, 64 | .reveal h3, 65 | .reveal h4, 66 | .reveal h5, 67 | .reveal h6 { 68 | font-weight: 700; 69 | } 70 | 71 | .reveal p code { 72 | background-color: $codeBackground; 73 | display: inline-block; 74 | border-radius: 7px; 75 | } 76 | 77 | .reveal small code { 78 | vertical-align: baseline; 79 | } -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/league.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * League theme for reveal.js. 3 | * 4 | * This was the default theme pre-3.0.0. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(../../lib/font/league-gothic/league-gothic.css); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | // Override theme settings (see ../template/settings.scss) 22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 24 | 25 | // Background generator 26 | @mixin bodyBackground() { 27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 28 | } 29 | 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/moon.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Dark theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | /** 19 | * Solarized colors by Ethan Schoonover 20 | */ 21 | html * { 22 | color-profile: sRGB; 23 | rendering-intent: auto; 24 | } 25 | 26 | // Solarized colors 27 | $base03: #002b36; 28 | $base02: #073642; 29 | $base01: #586e75; 30 | $base00: #657b83; 31 | $base0: #839496; 32 | $base1: #93a1a1; 33 | $base2: #eee8d5; 34 | $base3: #fdf6e3; 35 | $yellow: #b58900; 36 | $orange: #cb4b16; 37 | $red: #dc322f; 38 | $magenta: #d33682; 39 | $violet: #6c71c4; 40 | $blue: #268bd2; 41 | $cyan: #2aa198; 42 | $green: #859900; 43 | 44 | // Override theme settings (see ../template/settings.scss) 45 | $mainColor: $base1; 46 | $headingColor: $base2; 47 | $headingTextShadow: none; 48 | $backgroundColor: $base03; 49 | $linkColor: $blue; 50 | $linkColorHover: lighten( $linkColor, 20% ); 51 | $selectionBackgroundColor: $magenta; 52 | 53 | 54 | 55 | // Theme template ------------------------------ 56 | @import "../template/theme"; 57 | // --------------------------------------------- 58 | -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | $mainFontSize: 30px; 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | 8 | 9 | // Default mixins and settings ----------------- 10 | @import "../template/mixins"; 11 | @import "../template/settings"; 12 | // --------------------------------------------- 13 | 14 | 15 | 16 | // Override theme settings (see ../template/settings.scss) 17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 18 | $mainColor: #000; 19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 20 | $headingColor: #383D3D; 21 | $headingTextShadow: none; 22 | $headingTextTransform: none; 23 | $backgroundColor: #F0F1EB; 24 | $linkColor: #51483D; 25 | $linkColorHover: lighten( $linkColor, 20% ); 26 | $selectionBackgroundColor: #26351C; 27 | 28 | .reveal a { 29 | line-height: 1.3em; 30 | } 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- 36 | -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/simple.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | 22 | // Override theme settings (see ../template/settings.scss) 23 | $mainFont: 'Lato', sans-serif; 24 | $mainColor: #000; 25 | $headingFont: 'News Cycle', Impact, sans-serif; 26 | $headingColor: #000; 27 | $headingTextShadow: none; 28 | $headingTextTransform: none; 29 | $backgroundColor: #fff; 30 | $linkColor: #00008B; 31 | $linkColorHover: lighten( $linkColor, 20% ); 32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99); 33 | 34 | 35 | 36 | // Theme template ------------------------------ 37 | @import "../template/theme"; 38 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Fix links so they are not cut off 33 | .reveal a { 34 | line-height: 1.3em; 35 | } 36 | 37 | // Background generator 38 | @mixin bodyBackground() { 39 | @include radial-gradient( #add9e4, #f7fbfc ); 40 | } 41 | 42 | 43 | 44 | // Theme template ------------------------------ 45 | @import "../template/theme"; 46 | // --------------------------------------------- 47 | -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/solarized.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Light theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | 19 | /** 20 | * Solarized colors by Ethan Schoonover 21 | */ 22 | html * { 23 | color-profile: sRGB; 24 | rendering-intent: auto; 25 | } 26 | 27 | // Solarized colors 28 | $base03: #002b36; 29 | $base02: #073642; 30 | $base01: #586e75; 31 | $base00: #657b83; 32 | $base0: #839496; 33 | $base1: #93a1a1; 34 | $base2: #eee8d5; 35 | $base3: #fdf6e3; 36 | $yellow: #b58900; 37 | $orange: #cb4b16; 38 | $red: #dc322f; 39 | $magenta: #d33682; 40 | $violet: #6c71c4; 41 | $blue: #268bd2; 42 | $cyan: #2aa198; 43 | $green: #859900; 44 | 45 | // Override theme settings (see ../template/settings.scss) 46 | $mainColor: $base00; 47 | $headingColor: $base01; 48 | $headingTextShadow: none; 49 | $backgroundColor: $base3; 50 | $linkColor: $blue; 51 | $linkColorHover: lighten( $linkColor, 20% ); 52 | $selectionBackgroundColor: $magenta; 53 | 54 | // Background generator 55 | // @mixin bodyBackground() { 56 | // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); 57 | // } 58 | 59 | 60 | 61 | // Theme template ------------------------------ 62 | @import "../template/theme"; 63 | // --------------------------------------------- 64 | -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/source/white.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * White theme for reveal.js. This is the opposite of the 'black' theme. 3 | * 4 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #fff; 20 | 21 | $mainColor: #222; 22 | $headingColor: #222; 23 | 24 | $mainFontSize: 38px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #2a76dd; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-dark-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #fff; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/template/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin vertical-gradient( $top, $bottom ) { 2 | background: $top; 3 | background: -moz-linear-gradient( top, $top 0%, $bottom 100% ); 4 | background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) ); 5 | background: -webkit-linear-gradient( top, $top 0%, $bottom 100% ); 6 | background: -o-linear-gradient( top, $top 0%, $bottom 100% ); 7 | background: -ms-linear-gradient( top, $top 0%, $bottom 100% ); 8 | background: linear-gradient( top, $top 0%, $bottom 100% ); 9 | } 10 | 11 | @mixin horizontal-gradient( $top, $bottom ) { 12 | background: $top; 13 | background: -moz-linear-gradient( left, $top 0%, $bottom 100% ); 14 | background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) ); 15 | background: -webkit-linear-gradient( left, $top 0%, $bottom 100% ); 16 | background: -o-linear-gradient( left, $top 0%, $bottom 100% ); 17 | background: -ms-linear-gradient( left, $top 0%, $bottom 100% ); 18 | background: linear-gradient( left, $top 0%, $bottom 100% ); 19 | } 20 | 21 | @mixin radial-gradient( $outer, $inner, $type: circle ) { 22 | background: $outer; 23 | background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 24 | background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); 25 | background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 26 | background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 27 | background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 28 | background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 29 | } -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 36px; 10 | $mainColor: #eee; 11 | 12 | // Vertical spacing between blocks of text 13 | $blockMargin: 20px; 14 | 15 | // Headings 16 | $headingMargin: 0 0 $blockMargin 0; 17 | $headingFont: 'League Gothic', Impact, sans-serif; 18 | $headingColor: #eee; 19 | $headingLineHeight: 1.2; 20 | $headingLetterSpacing: normal; 21 | $headingTextTransform: uppercase; 22 | $headingTextShadow: none; 23 | $headingFontWeight: normal; 24 | $heading1TextShadow: $headingTextShadow; 25 | 26 | $heading1Size: 3.77em; 27 | $heading2Size: 2.11em; 28 | $heading3Size: 1.55em; 29 | $heading4Size: 1.00em; 30 | 31 | // Links and actions 32 | $linkColor: #13DAEC; 33 | $linkColorHover: lighten( $linkColor, 20% ); 34 | 35 | // Text selection 36 | $selectionBackgroundColor: #FF5E99; 37 | $selectionColor: #fff; 38 | 39 | // Generates the presentation background, can be overridden 40 | // to return a background image or gradient 41 | @mixin bodyBackground() { 42 | background: $backgroundColor; 43 | } -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/images/basta-spring-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/images/basta-spring-background.png -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/images/basta-spring-footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/images/basta-spring-footer.png -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/images/crossplatformmagazine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/images/crossplatformmagazine.png -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/images/cw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/images/cw.png -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/images/generic-web-api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/images/generic-web-api.png -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/images/mr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/images/mr.png -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/images/node-js-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/images/node-js-server.png -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/images/ttLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/images/ttLogo.png -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; padding: 0.5em; 10 | background: #3F3F3F; 11 | color: #DCDCDC; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-tag, 16 | .css .hljs-class, 17 | .css .hljs-id, 18 | .lisp .hljs-title, 19 | .nginx .hljs-title, 20 | .hljs-request, 21 | .hljs-status, 22 | .clojure .hljs-attribute { 23 | color: #E3CEAB; 24 | } 25 | 26 | .django .hljs-template_tag, 27 | .django .hljs-variable, 28 | .django .hljs-filter .hljs-argument { 29 | color: #DCDCDC; 30 | } 31 | 32 | .hljs-number, 33 | .hljs-date { 34 | color: #8CD0D3; 35 | } 36 | 37 | .dos .hljs-envvar, 38 | .dos .hljs-stream, 39 | .hljs-variable, 40 | .apache .hljs-sqbracket { 41 | color: #EFDCBC; 42 | } 43 | 44 | .dos .hljs-flow, 45 | .diff .hljs-change, 46 | .python .exception, 47 | .python .hljs-built_in, 48 | .hljs-literal, 49 | .tex .hljs-special { 50 | color: #EFEFAF; 51 | } 52 | 53 | .diff .hljs-chunk, 54 | .hljs-subst { 55 | color: #8F8F8F; 56 | } 57 | 58 | .dos .hljs-keyword, 59 | .python .hljs-decorator, 60 | .hljs-title, 61 | .haskell .hljs-type, 62 | .diff .hljs-header, 63 | .ruby .hljs-class .hljs-parent, 64 | .apache .hljs-tag, 65 | .nginx .hljs-built_in, 66 | .tex .hljs-command, 67 | .hljs-prompt { 68 | color: #efef8f; 69 | } 70 | 71 | .dos .hljs-winutils, 72 | .ruby .hljs-symbol, 73 | .ruby .hljs-symbol .hljs-string, 74 | .ruby .hljs-string { 75 | color: #DCA3A3; 76 | } 77 | 78 | .diff .hljs-deletion, 79 | .hljs-string, 80 | .hljs-tag .hljs-value, 81 | .hljs-preprocessor, 82 | .hljs-pragma, 83 | .hljs-built_in, 84 | .sql .hljs-aggregate, 85 | .hljs-javadoc, 86 | .smalltalk .hljs-class, 87 | .smalltalk .hljs-localvars, 88 | .smalltalk .hljs-array, 89 | .css .hljs-rules .hljs-value, 90 | .hljs-attr_selector, 91 | .hljs-pseudo, 92 | .apache .hljs-cbracket, 93 | .tex .hljs-formula, 94 | .coffeescript .hljs-attribute { 95 | color: #CC9393; 96 | } 97 | 98 | .hljs-shebang, 99 | .diff .hljs-addition, 100 | .hljs-comment, 101 | .java .hljs-annotation, 102 | .hljs-template_comment, 103 | .hljs-pi, 104 | .hljs-doctype { 105 | color: #7F9F7F; 106 | } 107 | 108 | .coffeescript .javascript, 109 | .javascript .xml, 110 | .tex .hljs-formula, 111 | .xml .javascript, 112 | .xml .vbscript, 113 | .xml .css, 114 | .xml .hljs-cdata { 115 | opacity: 0.5; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /presentations/2016-presentation-basta-spring/lib/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p 3 | Copyright Tero Piirainen (tipiirai) 4 | License MIT / http://bit.ly/mit-license 5 | Version 0.96 6 | 7 | http://headjs.com 8 | */(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; padding: 0.5em; 10 | background: #3F3F3F; 11 | color: #DCDCDC; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-tag, 16 | .css .hljs-class, 17 | .css .hljs-id, 18 | .lisp .hljs-title, 19 | .nginx .hljs-title, 20 | .hljs-request, 21 | .hljs-status, 22 | .clojure .hljs-attribute { 23 | color: #E3CEAB; 24 | } 25 | 26 | .django .hljs-template_tag, 27 | .django .hljs-variable, 28 | .django .hljs-filter .hljs-argument { 29 | color: #DCDCDC; 30 | } 31 | 32 | .hljs-number, 33 | .hljs-date { 34 | color: #8CD0D3; 35 | } 36 | 37 | .dos .hljs-envvar, 38 | .dos .hljs-stream, 39 | .hljs-variable, 40 | .apache .hljs-sqbracket { 41 | color: #EFDCBC; 42 | } 43 | 44 | .dos .hljs-flow, 45 | .diff .hljs-change, 46 | .python .exception, 47 | .python .hljs-built_in, 48 | .hljs-literal, 49 | .tex .hljs-special { 50 | color: #EFEFAF; 51 | } 52 | 53 | .diff .hljs-chunk, 54 | .hljs-subst { 55 | color: #8F8F8F; 56 | } 57 | 58 | .dos .hljs-keyword, 59 | .python .hljs-decorator, 60 | .hljs-title, 61 | .haskell .hljs-type, 62 | .diff .hljs-header, 63 | .ruby .hljs-class .hljs-parent, 64 | .apache .hljs-tag, 65 | .nginx .hljs-built_in, 66 | .tex .hljs-command, 67 | .hljs-prompt { 68 | color: #efef8f; 69 | } 70 | 71 | .dos .hljs-winutils, 72 | .ruby .hljs-symbol, 73 | .ruby .hljs-symbol .hljs-string, 74 | .ruby .hljs-string { 75 | color: #DCA3A3; 76 | } 77 | 78 | .diff .hljs-deletion, 79 | .hljs-string, 80 | .hljs-tag .hljs-value, 81 | .hljs-preprocessor, 82 | .hljs-pragma, 83 | .hljs-built_in, 84 | .sql .hljs-aggregate, 85 | .hljs-javadoc, 86 | .smalltalk .hljs-class, 87 | .smalltalk .hljs-localvars, 88 | .smalltalk .hljs-array, 89 | .css .hljs-rules .hljs-value, 90 | .hljs-attr_selector, 91 | .hljs-pseudo, 92 | .apache .hljs-cbracket, 93 | .tex .hljs-formula, 94 | .coffeescript .hljs-attribute { 95 | color: #CC9393; 96 | } 97 | 98 | .hljs-shebang, 99 | .diff .hljs-addition, 100 | .hljs-comment, 101 | .java .hljs-annotation, 102 | .hljs-template_comment, 103 | .hljs-pi, 104 | .hljs-doctype { 105 | color: #7F9F7F; 106 | } 107 | 108 | .coffeescript .javascript, 109 | .javascript .xml, 110 | .tex .hljs-formula, 111 | .xml .javascript, 112 | .xml .vbscript, 113 | .xml .css, 114 | .xml .hljs-cdata { 115 | opacity: 0.5; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /presentations/2016-presentation_ug-ka/lib/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p 3 | Copyright Tero Piirainen (tipiirai) 4 | License MIT / http://bit.ly/mit-license 5 | Version 0.96 6 | 7 | http://headjs.com 8 | */(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c> /etc/apt/sources.list 4 | RUN apt-get -qq update && apt-get install -qqy sqlite3 libsqlite3-dev && rm -rf /var/lib/apt/lists/* 5 | 6 | COPY . /app 7 | WORKDIR /app 8 | RUN ["dnu", "restore"] 9 | 10 | EXPOSE 5000/tcp 11 | ENTRYPOINT ["dnx", "-p", "project.json", "web"] 12 | -------------------------------------------------------------------------------- /src/aspNetCore/STS/IdentityServerConfiguration/Clients.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using IdentityServer4.Core.Models; 3 | 4 | namespace CustomerWebApi 5 | { 6 | public static class Clients 7 | { 8 | public static IEnumerable Get() 9 | { 10 | return new List() { 11 | new Client() { 12 | ClientId = "sample-client", 13 | ClientSecrets = new List() { 14 | new Secret("sample-secret".Sha256()) 15 | }, 16 | 17 | Flow = Flows.ResourceOwner, 18 | AccessTokenType = AccessTokenType.Reference, 19 | AllowedScopes = new List() { 20 | StandardScopes.OpenId.Name, 21 | StandardScopes.Email.Name, 22 | StandardScopes.OfflineAccess.Name, 23 | "api" 24 | } 25 | } 26 | }; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/aspNetCore/STS/IdentityServerConfiguration/Scopes.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using IdentityServer4.Core.Models; 3 | 4 | namespace CustomerWebApi 5 | { 6 | public static class Scopes 7 | { 8 | public static IEnumerable Get() 9 | { 10 | return new List() { 11 | StandardScopes.OpenId, 12 | StandardScopes.Email, 13 | StandardScopes.OfflineAccess, 14 | new Scope() { 15 | Name = "api", 16 | DisplayName = "API", 17 | Description = "Sample Web API", 18 | Type = ScopeType.Resource, 19 | ScopeSecrets = new List() { 20 | new Secret("apisecret".Sha256()) 21 | } 22 | } 23 | }; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/aspNetCore/STS/IdentityServerConfiguration/Users.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Security.Claims; 3 | using IdentityServer4.Core; 4 | using IdentityServer4.Core.Services.InMemory; 5 | 6 | namespace CustomerWebApi 7 | { 8 | public static class Users 9 | { 10 | public static List Get() 11 | { 12 | return new List() { 13 | new InMemoryUser() { 14 | Subject = "sample-bob", 15 | Username = "bob", 16 | Password = "bob", 17 | Claims = new Claim[] { 18 | new Claim(Constants.ClaimTypes.Name, "Bob Smith"), 19 | new Claim(Constants.ClaimTypes.GivenName, "Bob"), 20 | new Claim(Constants.ClaimTypes.FamilyName, "Smith"), 21 | new Claim(Constants.ClaimTypes.Email, "BobSmith@email.com"), 22 | new Claim(Constants.ClaimTypes.EmailVerified, "true", ClaimValueTypes.Boolean) 23 | } 24 | } 25 | }; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/aspNetCore/STS/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Verbose", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/aspNetCore/STS/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "compilationOptions": { 4 | "emitEntryPoint": true 5 | }, 6 | "tooling": { 7 | "defaultNamespace": "CustomerWebApi" 8 | }, 9 | "dependencies": { 10 | "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", 11 | "Microsoft.AspNet.Mvc": "6.0.0-rc1-final", 12 | "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", 13 | "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final", 14 | "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final", 15 | "Microsoft.Extensions.Logging": "1.0.0-rc1-final", 16 | "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final", 17 | "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final", 18 | "IdentityServer4": "1.0.0-beta1", 19 | "Microsoft.AspNet.Cors": "6.0.0-rc1-final" 20 | }, 21 | "commands": { 22 | "web": "Microsoft.AspNet.Server.Kestrel --server.urls=http://localhost:5001" 23 | }, 24 | "frameworks": { 25 | "dnx451": {}, 26 | "dnxcore50": {} 27 | }, 28 | "exclude": [ 29 | "wwwroot", 30 | "node_modules", 31 | "bower_components" 32 | ], 33 | "publishExclude": [ 34 | "**.user", 35 | "**.vspscc" 36 | ] 37 | } -------------------------------------------------------------------------------- /src/aspNetCore/WebAPI/Controllers/Customer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Mvc; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using Microsoft.AspNet.Authorization; 6 | 7 | namespace CustomerWebApi 8 | { 9 | [Route("api/[controller]")] 10 | [Authorize] 11 | [Produces("application/json")] 12 | public class Customer : Controller 13 | { 14 | private ICustomerService _customerService { get; set; } 15 | 16 | public Customer(ICustomerService customerService) { 17 | _customerService = customerService; 18 | } 19 | 20 | /// 21 | /// This method will return all currently saved customers. 22 | /// 23 | [HttpGet("list")] 24 | [Produces(typeof(CustomerModel[]))] 25 | public IActionResult List() 26 | { 27 | return Ok(_customerService.List()); 28 | } 29 | 30 | /// 31 | /// This method creates a new customer. 32 | /// 33 | [HttpPost("")] 34 | public IActionResult Create([FromBody] CustomerModel model) { 35 | _customerService.Create(model); 36 | return Ok(); 37 | } 38 | 39 | /// 40 | /// This methods deletes a given customer. 41 | /// 42 | /// The id of the user to delete 43 | [HttpDelete("{id}")] 44 | public IActionResult Delete(int id) { 45 | _customerService.Delete(id); 46 | return Ok(); 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /src/aspNetCore/WebAPI/Database/CustomerContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Data.Entity; 2 | 3 | namespace CustomerWebApi 4 | { 5 | public class CustomerContext : DbContext 6 | { 7 | public DbSet Customers { get; set; } 8 | 9 | protected override void OnModelCreating(ModelBuilder modelBuilder) { 10 | modelBuilder.Entity() 11 | .HasKey(p => p.Id); 12 | 13 | modelBuilder.Entity() 14 | .Property(p => p.FirstName) 15 | .IsRequired(); 16 | 17 | modelBuilder.Entity() 18 | .Property(p => p.LastName) 19 | .IsRequired(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/aspNetCore/WebAPI/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM microsoft/aspnet:1.0.0-rc1-update1 2 | 3 | RUN printf "deb http://ftp.us.debian.org/debian jessie main\n" >> /etc/apt/sources.list 4 | RUN apt-get -qq update && apt-get install -qqy sqlite3 libsqlite3-dev && rm -rf /var/lib/apt/lists/* 5 | 6 | COPY . /app 7 | WORKDIR /app 8 | RUN ["dnu", "restore"] 9 | 10 | EXPOSE 5000/tcp 11 | ENTRYPOINT ["dnx", "-p", "project.json", "web"] 12 | -------------------------------------------------------------------------------- /src/aspNetCore/WebAPI/Models/CustomerModel.cs: -------------------------------------------------------------------------------- 1 | namespace CustomerWebApi 2 | { 3 | /// 4 | /// Model representing a very simple customer 5 | /// 6 | public class CustomerModel 7 | { 8 | /// 9 | /// A unique key of a concrete customer 10 | /// 11 | public int Id { get; set; } 12 | 13 | /// 14 | /// The first name of customer 15 | /// 16 | public string FirstName { get; set; } 17 | 18 | /// 19 | /// The last name of a customer 20 | /// 21 | public string LastName { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/aspNetCore/WebAPI/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "IIS Express": { 4 | "commandName": "IISExpress", 5 | "launchBrowser": true, 6 | "launchUrl": "api/values", 7 | "environmentVariables": { 8 | "ASPNET_ENV": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/aspNetCore/WebAPI/Services/DatabaseCustomerService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | using System.Linq; 5 | 6 | namespace CustomerWebApi 7 | { 8 | public class DatabaseCustomerService : ICustomerService 9 | { 10 | private CustomerContext _context { get; set; } 11 | 12 | public DatabaseCustomerService(CustomerContext context) 13 | { 14 | _context = context; 15 | 16 | // Should only be used for testing and dev purposes! 17 | // https://github.com/aspnet/EntityFramework/issues/3160#issuecomment-144471211 18 | _context.Database.EnsureCreated(); 19 | } 20 | 21 | public void Create(CustomerModel model) 22 | { 23 | _context.Customers.Add(model); 24 | _context.SaveChanges(); 25 | 26 | } 27 | 28 | public void Delete(int id) 29 | { 30 | var entity = _context.Customers.Single(e => e.Id == id); 31 | 32 | if (entity != null) 33 | { 34 | _context.Customers.Remove(entity); 35 | _context.SaveChanges(); 36 | } 37 | } 38 | 39 | public IEnumerable List() 40 | { 41 | return _context.Customers.ToList(); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/aspNetCore/WebAPI/Services/ICustomerService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace CustomerWebApi 4 | { 5 | public interface ICustomerService 6 | { 7 | IEnumerable List(); 8 | void Create(CustomerModel model); 9 | void Delete(int id); 10 | } 11 | } -------------------------------------------------------------------------------- /src/aspNetCore/WebAPI/Services/InMemoryCustomerService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerWebApi 5 | { 6 | // In Memory implementation for a customer 7 | public class InMemoryCustomerService : ICustomerService 8 | { 9 | private IDictionary _internalStorage = new Dictionary(); 10 | 11 | public void Create(CustomerModel model) 12 | { 13 | model.Id = _internalStorage.Count + 1; 14 | _internalStorage.Add(model.Id, model); 15 | } 16 | 17 | public void Delete(int id) 18 | { 19 | _internalStorage.Remove(id); 20 | } 21 | 22 | public IEnumerable List() 23 | { 24 | return _internalStorage.Values; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/aspNetCore/WebAPI/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Verbose", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/aspNetCore/WebAPI/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "compilationOptions": { 4 | "emitEntryPoint": true 5 | }, 6 | "tooling": { 7 | "defaultNamespace": "CustomerWebApi" 8 | }, 9 | "dependencies": { 10 | "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", 11 | "Microsoft.AspNet.Mvc": "6.0.0-rc1-final", 12 | "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", 13 | "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final", 14 | "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final", 15 | "Microsoft.Extensions.Logging": "1.0.0-rc1-final", 16 | "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final", 17 | "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final", 18 | "EntityFramework7.Npgsql": "3.1.0-rc1-3", 19 | "Microsoft.AspNet.Authentication.JwtBearer": "1.0.0-rc1-final", 20 | "Microsoft.AspNet.Cors": "6.0.0-rc1-final", 21 | "IdentityServer4.AccessTokenValidation": "1.0.0-beta3", 22 | "Microsoft.AspNet.Authorization": "1.0.0-rc1-final", 23 | "System.IdentityModel.Tokens": "5.0.0-rc1-211161024", 24 | "Swashbuckle.SwaggerGen": "6.0.0-rc1-final", 25 | "Swashbuckle.SwaggerUi": "6.0.0-rc1-final" 26 | }, 27 | "commands": { 28 | "web": "Microsoft.AspNet.Server.Kestrel" 29 | }, 30 | "frameworks": { 31 | "dnx451": {}, 32 | "dnxcore50": {} 33 | }, 34 | "exclude": [ 35 | "wwwroot", 36 | "node_modules", 37 | "bower_components" 38 | ], 39 | "publishExclude": [ 40 | "**.user", 41 | "**.vspscc" 42 | ] 43 | } -------------------------------------------------------------------------------- /src/ng2client/app/boot.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | import {provide} from 'angular2/core'; 4 | import {bootstrap} from 'angular2/platform/browser'; 5 | import {ROUTER_PROVIDERS, LocationStrategy, HashLocationStrategy} from 'angular2/router'; 6 | import {HTTP_PROVIDERS} from 'angular2/http'; 7 | 8 | import {AppComponent} from './components/app/app'; 9 | 10 | bootstrap(AppComponent, [ 11 | ROUTER_PROVIDERS, 12 | provide(LocationStrategy, { useClass: HashLocationStrategy }), 13 | HTTP_PROVIDERS 14 | ]); 15 | -------------------------------------------------------------------------------- /src/ng2client/app/components/adminArea/adminArea.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /src/ng2client/app/components/adminArea/adminArea.ts: -------------------------------------------------------------------------------- 1 | import {Component} from 'angular2/core'; 2 | import {RouterOutlet, RouteConfig, Route} from 'angular2/router'; 3 | import {NavigationComponent} from '../navigation/navigation'; 4 | import {AdminHomeComponent} from '../adminHome/adminHome'; 5 | import {AdminCustomerListComponent} from '../adminCustomerList/adminCustomerList'; 6 | import {AdminCustomerCreateComponent} from '../adminCustomerCreate/adminCustomerCreate'; 7 | 8 | @Component({ 9 | selector: 'nfn-admin-area', 10 | templateUrl: 'app/components/adminArea/adminArea.html', 11 | directives: [RouterOutlet, NavigationComponent] 12 | }) 13 | @RouteConfig([ 14 | new Route({ path: '/home', name: 'AdminHome', component: AdminHomeComponent, useAsDefault: true }), 15 | new Route({ path: '/customers', name: 'AdminCustomers', component: AdminCustomerListComponent }), 16 | new Route({ path: '/create', name: 'AdminCustomersCreate', component: AdminCustomerCreateComponent }) 17 | ]) 18 | export class AdminAreaComponent { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/ng2client/app/components/adminCustomerCreate/adminCustomerCreate.html: -------------------------------------------------------------------------------- 1 |
2 | Create a new customer 3 |
4 |
    5 |
  • 6 | 7 | 10 |
  • 11 |
  • 12 | 13 | 15 |
  • 16 |
  • 17 | 21 |
  • 22 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /src/ng2client/app/components/adminCustomerCreate/adminCustomerCreate.ts: -------------------------------------------------------------------------------- 1 | import {Component} from 'angular2/core'; 2 | import {CustomerApiService} from '../../services/customerApiService'; 3 | import {Router} from 'angular2/router'; 4 | 5 | @Component({ 6 | selector: 'nfn-admin-customer-create', 7 | templateUrl: 'app/components/adminCustomerCreate/adminCustomerCreate.html' 8 | }) 9 | export class AdminCustomerCreateComponent { 10 | public firstName: string; 11 | public lastName: string; 12 | 13 | constructor(private _customerApiService: CustomerApiService, private _router: Router) { 14 | } 15 | 16 | private onSubmitted() { 17 | this._customerApiService.create(this.firstName, this.lastName) 18 | .subscribe(() => this._router.navigate(['AdminCustomers'])); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/ng2client/app/components/adminCustomerList/adminCustomerList.html: -------------------------------------------------------------------------------- 1 |

Customer list

2 |
3 |
4 |
5 | Create new customer 6 | Delete selected customer 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 |
IDFirst nameLast name
{{ customer.id }}{{ customer.firstName }}{{ customer.lastName }}
25 |
26 |
27 |
28 |
29 | Customer Details 30 |
31 |
Id
32 |
{{ selectedCustomer.id }}
33 |
34 |
35 |
36 |
First name
37 |
{{ selectedCustomer.firstName }}
38 |
39 |
40 |
Last name
41 |
{{ selectedCustomer.lastName }}
42 |
43 |
44 |
45 |
Details
46 |
47 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ac lacus odio. Aenean eget nibh 48 | in sapien 49 | facilisis faucibus eu et risus. Suspendisse suscipit ante neque, quis blandit justo porta in. 50 | Mauris 51 | accumsan ipsum ex, non ultricies orci dapibus id. Quisque sollicitudin efficitur nulla, eu 52 | aliquet risus 53 | fringilla in. Quisque facilisis lorem sapien, in molestie nibh tincidunt volutpat. Etiam sit 54 | amet enim 55 | molestie, faucibus nibh vel, blandit diam. Ut tempor ante a enim imperdiet, non lacinia ipsum 56 | consequat. 57 |
58 |
59 |
60 |
61 |
62 |
63 | -------------------------------------------------------------------------------- /src/ng2client/app/components/adminCustomerList/adminCustomerList.ts: -------------------------------------------------------------------------------- 1 | import {Component, OnInit} from 'angular2/core'; 2 | import {CustomerModel} from '../../model/customerModel'; 3 | import {CustomerApiService} from '../../services/customerApiService'; 4 | import {RouterLink} from 'angular2/router'; 5 | 6 | @Component({ 7 | selector: 'nfn-admin-customer-list', 8 | templateUrl: 'app/components/adminCustomerList/adminCustomerList.html', 9 | directives: [RouterLink] 10 | }) 11 | export class AdminCustomerListComponent implements OnInit { 12 | public customers: Array = []; 13 | 14 | public selectedCustomer: CustomerModel; 15 | 16 | constructor(private _customerApiService: CustomerApiService) { 17 | } 18 | 19 | ngOnInit(): any { 20 | this.refresh(); 21 | } 22 | 23 | private refresh() { 24 | this._customerApiService.list() 25 | .subscribe(res => { 26 | this.customers = res; 27 | this.selectedCustomer = undefined; 28 | }); 29 | } 30 | 31 | public deleteSelectedCustomer(): void { 32 | if (!this.selectedCustomer) { 33 | return; 34 | } 35 | 36 | this._customerApiService.remove(this.selectedCustomer.id) 37 | .subscribe(() => this.refresh()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/ng2client/app/components/adminHome/adminHome.html: -------------------------------------------------------------------------------- 1 |

Admin Area - Home

2 |

Welcome to the Sample Admin Area. Please use the navigation on the left.

3 | 4 |

Additional resources

5 | 16 | -------------------------------------------------------------------------------- /src/ng2client/app/components/adminHome/adminHome.ts: -------------------------------------------------------------------------------- 1 | import {Component} from 'angular2/core'; 2 | 3 | @Component({ 4 | selector: 'nfn-admin-home', 5 | templateUrl: 'app/components/adminHome/adminHome.html' 6 | }) 7 | export class AdminHomeComponent { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/ng2client/app/components/app/app.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/ng2client/app/components/app/app.ts: -------------------------------------------------------------------------------- 1 | import {Component} from 'angular2/core'; 2 | import {RouteConfig, Route, RouterOutlet} from 'angular2/router'; 3 | import 'rxjs/Rx'; 4 | 5 | import {LoginComponent} from '../login/login'; 6 | import {APP_SERVICES} from '../../services/services'; 7 | import {AdminAreaComponent} from '../adminArea/adminArea'; 8 | 9 | @Component({ 10 | selector: 'nfn-app', 11 | templateUrl: 'app/components/app/app.html', 12 | directives: [RouterOutlet], 13 | providers: APP_SERVICES 14 | }) 15 | @RouteConfig([ 16 | new Route({ path: '/login', name: 'Login', component: LoginComponent, useAsDefault: true }), 17 | new Route({ path: '/admin/...', name: 'AdminArea', component: AdminAreaComponent }) 18 | ]) 19 | export class AppComponent { 20 | } 21 | -------------------------------------------------------------------------------- /src/ng2client/app/components/login/login.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Login 4 |
5 |
    6 |
  • 7 | 8 | 10 |
  • 11 |
  • 12 | 13 | 15 |
  • 16 |
  • 17 | 18 |
  • 19 |
20 |
21 |
22 |
23 | -------------------------------------------------------------------------------- /src/ng2client/app/components/login/login.ts: -------------------------------------------------------------------------------- 1 | import {Component} from 'angular2/core'; 2 | import {SecurityService} from '../../services/securityService'; 3 | import {Router} from 'angular2/router'; 4 | 5 | @Component({ 6 | selector: 'nfn-login', 7 | templateUrl: 'app/components/login/login.html' 8 | }) 9 | export class LoginComponent { 10 | private username: string; 11 | private password: string; 12 | 13 | constructor(private _securityService: SecurityService, private _router: Router) { 14 | } 15 | 16 | public onSubmitted(): void { 17 | this._securityService.login(this.username, this.password) 18 | .subscribe(res => { 19 | if (res) { 20 | this._router.navigate(['AdminArea']); 21 | } 22 | }); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/ng2client/app/components/navigation/navigation.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 10 |
11 | -------------------------------------------------------------------------------- /src/ng2client/app/components/navigation/navigation.ts: -------------------------------------------------------------------------------- 1 | import {Component} from 'angular2/core'; 2 | import {RouterLink, Router} from 'angular2/router'; 3 | import {SecurityService} from '../../services/securityService'; 4 | 5 | @Component({ 6 | selector: 'nfn-navigation', 7 | templateUrl: 'app/components/navigation/navigation.html', 8 | directives: [RouterLink] 9 | }) 10 | export class NavigationComponent { 11 | constructor(private _securityService: SecurityService, private _router: Router) { 12 | } 13 | 14 | public logout() { 15 | this._securityService.logout(); 16 | this._router.navigate(['Login']); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/ng2client/app/model/customerModel.ts: -------------------------------------------------------------------------------- 1 | export class CustomerModel { 2 | public userImageUrl: string; 3 | 4 | constructor(public id?: number, 5 | public firstName?: string, 6 | public lastName?: string) { 7 | 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/ng2client/app/services/customerApiService.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from 'angular2/core'; 2 | import {Http, Headers, Response} from 'angular2/http'; 3 | import {SecurityService} from './securityService'; 4 | import {Observable} from 'rxjs/Observable'; 5 | import {CustomerModel} from '../model/customerModel'; 6 | import {UrlService} from './urlService'; 7 | 8 | @Injectable() 9 | export class CustomerApiService { 10 | constructor(private _http: Http, private _securityService: SecurityService, private _urlService: UrlService) { 11 | } 12 | 13 | public list(): Observable> { 14 | const headers = this.createHeaders(); 15 | const endpoint = `${this._urlService.apiUrl}customer/list`; 16 | 17 | return this._http.get(endpoint, { 18 | headers: headers 19 | }) 20 | .flatMap(response => Observable.from(response.json())) 21 | // Uncomment for some nice uifaces ;-) 22 | /*.mergeMap((customer: CustomerModel) => { 23 | return this._http.get('http://uifaces.com/api/v1/random') 24 | .map(uiFaces => { 25 | var result = uiFaces.json(); 26 | customer.userImageUrl = result.image_urls.bigger; 27 | 28 | return customer; 29 | }); 30 | })*/ 31 | .toArray(); 32 | } 33 | 34 | public remove(userId: number): Observable { 35 | const headers = this.createHeaders(); 36 | const endpoint = `${this._urlService.apiUrl}customer/${userId}`; 37 | 38 | return this._http.delete(endpoint, { 39 | headers: headers 40 | }); 41 | } 42 | 43 | public create(firstName: string, lastName: string): Observable { 44 | const headers = this.createHeaders(); 45 | const endpoint = `${this._urlService.apiUrl}/customer`; 46 | const payload = new CustomerModel(); 47 | payload.firstName = firstName; 48 | payload.lastName = lastName; 49 | 50 | return this._http.post(endpoint, JSON.stringify(payload), { 51 | headers: headers 52 | }); 53 | } 54 | 55 | private createHeaders(): Headers { 56 | const headers: Headers = new Headers(); 57 | headers.append('Content-Type', 'application/json'); 58 | headers.append('Authorization', `Bearer ${this._securityService.token}`); 59 | return headers; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/ng2client/app/services/securityService.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from 'angular2/core'; 2 | import {Http, Headers} from 'angular2/http'; 3 | import {UrlService} from './urlService'; 4 | import {Observable} from 'rxjs/Observable'; 5 | 6 | @Injectable() 7 | export class SecurityService { 8 | private _clientId: string = 'sample-client'; 9 | private _clientSecret: string = 'sample-secret'; 10 | 11 | private _storageKeys = { 12 | token: 'sample.token', 13 | user: 'sample.user' 14 | }; 15 | 16 | private _token: string; 17 | private _user: string; 18 | 19 | constructor(private _http: Http, 20 | private _urlService: UrlService) { 21 | this.loadFromLocalStorage(); 22 | } 23 | 24 | public getAuthenticated(): boolean { 25 | return !!(this._token && this._user); 26 | } 27 | 28 | public get token(): string { 29 | return this._token; 30 | } 31 | 32 | public login(username: string, password: string): Observable { 33 | const tokenEndpoint = `${this._urlService.authorityUrl}token`; 34 | const requestContent = `username=${username}&password=${password}&client_id=${this._clientId}&client_secret=${this._clientSecret}&grant_type=password&scope=api`; 35 | 36 | const headers = new Headers(); 37 | headers.append('Content-Type', 'application/x-www-form-urlencoded'); 38 | 39 | return this._http.post(tokenEndpoint, requestContent, { 40 | headers: headers 41 | }) 42 | .map(res => { 43 | const result = res.json(); 44 | 45 | this._token = result.access_token; 46 | this._user = username; 47 | this.saveToLocalStorage(); 48 | 49 | return true; 50 | }, () => false); 51 | } 52 | 53 | public logout(): void { 54 | this._user = undefined; 55 | this._token = undefined; 56 | this.removeFromLocalStorage(); 57 | } 58 | 59 | private saveToLocalStorage() { 60 | localStorage.setItem(this._storageKeys.token, this._token); 61 | localStorage.setItem(this._storageKeys.user, this._user); 62 | } 63 | 64 | private loadFromLocalStorage() { 65 | this._token = localStorage.getItem(this._storageKeys.token); 66 | this._user = localStorage.getItem(this._storageKeys.user); 67 | } 68 | 69 | private removeFromLocalStorage() { 70 | localStorage.removeItem(this._storageKeys.token); 71 | localStorage.removeItem(this._storageKeys.user); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/ng2client/app/services/services.ts: -------------------------------------------------------------------------------- 1 | import {SecurityService} from './securityService'; 2 | import {UrlService} from './urlService'; 3 | import {CustomerApiService} from './customerApiService'; 4 | export const APP_SERVICES = [ 5 | SecurityService, 6 | UrlService, 7 | CustomerApiService 8 | ]; 9 | -------------------------------------------------------------------------------- /src/ng2client/app/services/urlService.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from 'angular2/core'; 2 | 3 | @Injectable() 4 | export class UrlService { 5 | private _baseUrl: string = 'http://localhost'; 6 | 7 | public get authorityUrl(): string { 8 | return `${this._baseUrl}:5001/connect/`; 9 | } 10 | 11 | public get apiUrl(): string { 12 | return `${this._baseUrl}:5000/api/`; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/ng2client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Node.js for .NET Devs - Sample API Client 8 | 9 | 10 | 11 | 12 | 13 | 14 | Loading... 15 | 16 | 17 | 18 | 19 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/ng2client/less/_mixins.less: -------------------------------------------------------------------------------- 1 | .maxSize { 2 | width: 100vw; 3 | height: 100vh; 4 | } 5 | -------------------------------------------------------------------------------- /src/ng2client/less/main.less: -------------------------------------------------------------------------------- 1 | @import "_mixins"; 2 | 3 | body { 4 | width:100vw; 5 | } 6 | 7 | .center { 8 | .maxSize(); 9 | 10 | display: flex; 11 | justify-content: center; 12 | align-items: center; 13 | flex-direction: column; 14 | 15 | h1 { 16 | margin-top: 0; 17 | } 18 | } 19 | 20 | // Copied over from flakes, since Angular 2 does not allow to change the router-link-active class name yet... :) 21 | li.router-link-active { 22 | background: #fffce2; 23 | font-style: italic 24 | } 25 | 26 | // Menu showing the "hamburger" stripes. So we don't need the image from flakes 27 | .box-shadow-menu { 28 | position: relative; 29 | padding-left: 1.25em; 30 | display: block; 31 | height: 18px; 32 | cursor: pointer; 33 | } 34 | 35 | .box-shadow-menu:before { 36 | content: ""; 37 | position: absolute; 38 | left: 0; 39 | top: 0.25em; 40 | width: 1em; 41 | height: 0.15em; 42 | background: black; 43 | box-shadow: 0 0.25em 0 0 black, 0 0.5em 0 0 black; 44 | } 45 | 46 | @media only screen and (max-width: 1149px) { 47 | .flakes-content { 48 | transition: transform 0.5s; 49 | 50 | &.open { 51 | transform: translate3d(250px, 0px, 0px); 52 | } 53 | } 54 | } 55 | 56 | // Makes flakes using the whole width 57 | @media only screen and (min-width: 1150px) { 58 | html { 59 | .flakes-frame { 60 | .flakes-content { 61 | width: ~"calc(100vw - 250px)"; 62 | } 63 | } 64 | } 65 | } 66 | 67 | table.flakes-table tbody tr.active td { 68 | background-color: lightgray; 69 | } 70 | 71 | [hidden] { 72 | display: none; 73 | } 74 | -------------------------------------------------------------------------------- /src/nodejs/STS/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const Server = require('./server'); 4 | const server = new Server(); 5 | server.start(5001); 6 | -------------------------------------------------------------------------------- /src/nodejs/STS/server/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Require express, another hosting platform for Node.js 4 | const express = require('express'), 5 | // Require the body-parser for express 6 | 7 | bodyParser = require('body-parser'), 8 | 9 | // Require a oauth2-server for node.js 10 | oAuthServer = require('oauth2-server'), 11 | 12 | // Require the cors middleware for express 13 | cors = require('cors'); 14 | 15 | // Require a oAuthModel which is used by the oauth2-server 16 | const oAuthModel = require('./oAuthModel'); 17 | 18 | /** 19 | * @public 20 | * @constructor 21 | */ 22 | function Server() { 23 | let app; 24 | 25 | /** 26 | * Starts the STS server on the given port 27 | * @param {number} port - The port where to start the server 28 | */ 29 | this.start = port => { 30 | // Create a new express instance 31 | app = express(); 32 | 33 | // Enable cors 34 | app.use(cors()); 35 | 36 | // Add the urlencoded parser middleware for express: https://github.com/expressjs/body-parser#bodyparserurlencodedoptions 37 | app.use(bodyParser.urlencoded({ extended: true })); 38 | 39 | // Add the json parser middleware for express: https://github.com/expressjs/body-parser#bodyparserjsonoptions 40 | app.use(bodyParser.json()); 41 | 42 | // Create a new oAuthServer 43 | app.oAuth = oAuthServer({ 44 | // Using our own oAuthModel 45 | model: oAuthModel, 46 | 47 | // Allow the password grant only for resource owner flow 48 | grants: ['password'] 49 | }); 50 | 51 | 52 | // Add the HTTP POST route /connect/token to get tokens using oAuthServer 53 | app.post('/connect/token', app.oAuth.grant()); 54 | 55 | // Add a custom HTTP POST route /connect/accesstokenvalidation to validate our tokens 56 | app.get('/connect/accesstokenvalidation', validateAccessToken); 57 | 58 | // Add the errorHandler middleware for express 59 | app.use(app.oAuth.errorHandler()); 60 | 61 | // Start the server on the given port 62 | app.listen(port, () => console.log(`STS is up and running on port ${port}.`)); 63 | }; 64 | 65 | // Method for validation access tokens 66 | function validateAccessToken(req, res) { 67 | if (!req.query.token) { 68 | return res.status(400).send('token is missing'); 69 | } 70 | 71 | // simply validate by checking if a token is saved in our oAuthModel 72 | // Should get some more validation for expiry etc. 73 | app.oAuth.model.getAccessToken(req.query.token, function (err) { 74 | if (err) { 75 | return res.status(400).send(err); 76 | } 77 | 78 | res.sendStatus(200); 79 | }); 80 | } 81 | } 82 | 83 | module.exports = Server; 84 | -------------------------------------------------------------------------------- /src/nodejs/STS/server/oAuthModel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @public 5 | * @constructor 6 | */ 7 | function OAuthModel() { 8 | const internalTokenStorage = {}; 9 | 10 | // Sample client as configured in vNext, too 11 | const sampleClient = { 12 | clientId: 'sample-client', 13 | clientSecret: 'sample-secret' 14 | }; 15 | 16 | // See here for needed method implementations: https://github.com/thomseddon/node-oauth2-server 17 | 18 | /** 19 | * Returns a client. In this sample there is only one valid client 20 | * @param {string} clientId 21 | * @param {string} clientSecret 22 | * @param {function} callback 23 | */ 24 | this.getClient = (clientId, clientSecret, callback) => { 25 | // This is a point, where clients can be loaded from a database 26 | callback(null, { 27 | clientId: sampleClient.clientId, 28 | clientSecret: sampleClient.clientSecret 29 | }); 30 | }; 31 | 32 | /** 33 | * Saves the access token to an internal storage object 34 | * @param {string} accessToken 35 | * @param {string} clientId 36 | * @param {number} expires 37 | * @param {string} user 38 | * @param {function} callback 39 | */ 40 | this.saveAccessToken = (accessToken, clientId, expires, user, callback) => { 41 | internalTokenStorage[accessToken] = { 42 | accessToken: accessToken, 43 | clientId: clientId, 44 | expires: expires, 45 | user: user 46 | }; 47 | 48 | callback(); 49 | }; 50 | 51 | /** 52 | * Checks if the grant type is allowed. For our sample, it must be password and the clientId must be sample-client 53 | * @param {string} clientId 54 | * @param {string} grantType 55 | * @param {function} callback 56 | */ 57 | this.grantTypeAllowed = (clientId, grantType, callback) => { 58 | callback(null, grantType === 'password' && clientId === sampleClient.clientId); 59 | }; 60 | 61 | /** 62 | * Tries to return an access token which has been saved previously by saveAccessToken method 63 | * @param {string} bearerToken 64 | * @param {function} callback 65 | */ 66 | this.getAccessToken = (bearerToken, callback) => { 67 | const token = internalTokenStorage[bearerToken]; 68 | 69 | if (!token) { 70 | return callback('AccessToken invalid.'); 71 | } 72 | 73 | callback(null, { 74 | accessToken: token.accessToken, 75 | clientId: token.clientId, 76 | expires: token.expires, 77 | userId: token.user 78 | }); 79 | }; 80 | 81 | /** 82 | * Authorizes a user. For our sample, only username bob with password bob is valid 83 | * 84 | * @param {string} username 85 | * @param {string} password 86 | * @param {function} callback 87 | */ 88 | this.getUser = (username, password, callback) => { 89 | // This is the point, where a database could be queried for user and check their password 90 | if (username === 'bob' && password === 'bob') { 91 | return callback(null, { 92 | id: 'bob' 93 | }); 94 | } 95 | 96 | callback(true); 97 | }; 98 | } 99 | 100 | module.exports = new OAuthModel(); 101 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/config/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | db: { 3 | // setup database type 4 | /*type: 'mongo', 5 | connectionString: 'mongodb://localhost/customer-sample-node'*/ 6 | type: 'postgres', 7 | connectionString: 'postgres://CustomerSample:CustomerSample@localhost:5432/CustomerSampleNodejs' 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/controllers/customer.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Require the services 4 | const services = require('../service'); 5 | 6 | /** 7 | * @public 8 | * @constructor 9 | */ 10 | function CustomerController() { 11 | this.initialize = function (server) { 12 | // Define a HTTP GET route which will execute "handleCustomerList" 13 | server.get('api/customer/list', handleCustomerList); 14 | 15 | // Define a HTTP POST route 16 | server.post('api/customer', handleCustomerCreation); 17 | 18 | // Define a HTTP DELETE route 19 | server.del('api/customer/:id', handleCustomerDeletion); 20 | }; 21 | 22 | /** 23 | * @swagger 24 | * path: /api/customer/list 25 | * httpMethod: GET 26 | * spec: 27 | * tags: 28 | * - Customer 29 | * summary: This method returns the customer list 30 | * responses: 31 | * 200: 32 | * description: Successful response 33 | * schema: 34 | * '$ref': '#/definitions/CustomerModel' 35 | */ 36 | function handleCustomerList(req, res) { 37 | // Call list method of the customer service 38 | services.get() 39 | .then(srv => srv.customer.list()) 40 | .then( 41 | // Successful handler: Return a json 42 | customers => res.json(200, customers), 43 | 44 | // Error handler: Send a HTTP status code 500 together with the error 45 | err => res.json(500, err) 46 | ); 47 | } 48 | 49 | /** 50 | * @swagger 51 | * path: /api/customer 52 | * httpMethod: POST 53 | * spec: 54 | * tags: 55 | * - Customer 56 | * summary: This methods creates a new customer 57 | * responses: 58 | * 200: 59 | * description: Customer created 60 | */ 61 | function handleCustomerCreation(req, res) { 62 | // req.body contains the json object which was transmitted 63 | services.get() 64 | .then(srv => srv.customer.create(req.body.firstName, req.body.lastName)) 65 | .then( 66 | () => res.send(200), 67 | err => res.json(500, err) 68 | ); 69 | } 70 | 71 | /** 72 | * @swagger 73 | * path: /api/customer/{id} 74 | * httpMethod: DELETE 75 | * spec: 76 | * tags: 77 | * - Customer 78 | * summary: This methods removes a customer 79 | * parameters: 80 | * - name: id 81 | * in: path 82 | * description: The id of the user to remove 83 | * required: true 84 | * type: integer 85 | * responses: 86 | * 200: 87 | * description: Customer removed 88 | */ 89 | function handleCustomerDeletion(req, res) { 90 | // req.params contains the url parameters defined in the route (:id) 91 | services.get() 92 | .then(srv => srv.customer.remove(req.params.id)) 93 | .then( 94 | () => res.send(200), 95 | err => res.send(500, err) 96 | ); 97 | } 98 | } 99 | 100 | module.exports = new CustomerController(); 101 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/controllers/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const customerController = require('./customer'); 4 | 5 | /** 6 | * @public 7 | * @constructor 8 | */ 9 | function Controllers() { 10 | this.initialize = function (server) { 11 | customerController.initialize(server); 12 | }; 13 | } 14 | 15 | module.exports = new Controllers(); 16 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/database/mongo/customerModel.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'), 2 | Schema = mongoose.Schema; 3 | 4 | var customerSchema = new Schema({ 5 | firstName: String, 6 | lastName: String 7 | }, { 8 | toObject: { virtuals: true }, 9 | toJSON: { virtuals: true } 10 | }); 11 | 12 | customerSchema.virtual('id').get(function () { 13 | return this._id; 14 | }); 15 | 16 | var Customer = mongoose.model('Customer', customerSchema); 17 | 18 | module.exports = Customer; 19 | 20 | /** 21 | * @swagger 22 | * definitions: 23 | * CustomerModel: 24 | * required: 25 | * - id 26 | * - firstName 27 | * - lastName 28 | * properties: 29 | * id: 30 | * type: string 31 | * description: A unique identifier 32 | * firstName: 33 | * type: string 34 | * description: The first name of the given customer 35 | * lastName: 36 | * type: string 37 | * description: The last name of the given customer 38 | */ 39 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/database/mongo/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const mongoose = require('mongoose'); 4 | 5 | // Using a provider pattern for db configuration and initialization 6 | module.exports = { 7 | configure: (connectionString) => { 8 | mongoose.connect(connectionString); 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/database/postgres/customerModel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function (sequelize, DataTypes) { 4 | return sequelize.define('customer', { 5 | id: { 6 | type: DataTypes.INTEGER, 7 | autoIncrement: true, 8 | primaryKey: true 9 | }, 10 | firstName: { 11 | type: DataTypes.STRING, 12 | allowNull: false 13 | }, 14 | lastName: { 15 | type: DataTypes.STRING, 16 | allowNull: false 17 | } 18 | }); 19 | }; 20 | 21 | /** 22 | * @swagger 23 | * definitions: 24 | * CustomerModel: 25 | * required: 26 | * - id 27 | * - firstName 28 | * - lastName 29 | * properties: 30 | * id: 31 | * type: integer 32 | * description: A unique identifier 33 | * firstName: 34 | * type: string 35 | * description: The first name of the given customer 36 | * lastName: 37 | * type: string 38 | * description: The last name of the given customer 39 | */ 40 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/database/postgres/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const Sequelize = require('sequelize'); 4 | 5 | let config; 6 | 7 | /** 8 | * @public 9 | * @constructor 10 | */ 11 | function Database() { 12 | const models = {}; 13 | let sequelize; 14 | 15 | this.initialize = () => { 16 | sequelize = new Sequelize(config.connectionString); 17 | 18 | initializeModels(); 19 | 20 | return syncDatabase() 21 | .then(() => { 22 | return { 23 | models: models, 24 | sequelize: sequelize 25 | } 26 | }); 27 | }; 28 | 29 | function initializeModels() { 30 | const customerModel = sequelize.import('./customerModel.js'); 31 | models[customerModel.name] = customerModel; 32 | } 33 | 34 | function syncDatabase() { 35 | return sequelize.sync(); 36 | } 37 | } 38 | 39 | let database; 40 | 41 | // Using a provider pattern for db configuration and initialization 42 | module.exports = { 43 | configure: (connectionString) => { 44 | config = { 45 | connectionString: connectionString 46 | }; 47 | }, 48 | get: () => { 49 | if (!config) { 50 | throw new Error('Please call .configure first before trying to resolve a database instance.'); 51 | } 52 | 53 | if (database) { 54 | return Promise.resolve(database); 55 | } 56 | 57 | return new Promise(resolve => { 58 | var dbInit = new Database(); 59 | dbInit.initialize() 60 | .then(db => { 61 | database = { 62 | models: db.models, 63 | sequelize: db.sequelize 64 | }; 65 | resolve(database); 66 | }); 67 | }); 68 | } 69 | }; 70 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Require the server, create a new instance and start it on port 8080 4 | const Server = require('./server'); 5 | const server = new Server(); 6 | server.start(5000); 7 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ 2 | html, 3 | body, 4 | div, 5 | span, 6 | applet, 7 | object, 8 | iframe, 9 | h1, 10 | h2, 11 | h3, 12 | h4, 13 | h5, 14 | h6, 15 | p, 16 | blockquote, 17 | pre, 18 | a, 19 | abbr, 20 | acronym, 21 | address, 22 | big, 23 | cite, 24 | code, 25 | del, 26 | dfn, 27 | em, 28 | img, 29 | ins, 30 | kbd, 31 | q, 32 | s, 33 | samp, 34 | small, 35 | strike, 36 | strong, 37 | sub, 38 | sup, 39 | tt, 40 | var, 41 | b, 42 | u, 43 | i, 44 | center, 45 | dl, 46 | dt, 47 | dd, 48 | ol, 49 | ul, 50 | li, 51 | fieldset, 52 | form, 53 | label, 54 | legend, 55 | table, 56 | caption, 57 | tbody, 58 | tfoot, 59 | thead, 60 | tr, 61 | th, 62 | td, 63 | article, 64 | aside, 65 | canvas, 66 | details, 67 | embed, 68 | figure, 69 | figcaption, 70 | footer, 71 | header, 72 | hgroup, 73 | menu, 74 | nav, 75 | output, 76 | ruby, 77 | section, 78 | summary, 79 | time, 80 | mark, 81 | audio, 82 | video { 83 | margin: 0; 84 | padding: 0; 85 | border: 0; 86 | font-size: 100%; 87 | font: inherit; 88 | vertical-align: baseline; 89 | } 90 | /* HTML5 display-role reset for older browsers */ 91 | article, 92 | aside, 93 | details, 94 | figcaption, 95 | figure, 96 | footer, 97 | header, 98 | hgroup, 99 | menu, 100 | nav, 101 | section { 102 | display: block; 103 | } 104 | body { 105 | line-height: 1; 106 | } 107 | ol, 108 | ul { 109 | list-style: none; 110 | } 111 | blockquote, 112 | q { 113 | quotes: none; 114 | } 115 | blockquote:before, 116 | blockquote:after, 117 | q:before, 118 | q:after { 119 | content: ''; 120 | content: none; 121 | } 122 | table { 123 | border-collapse: collapse; 124 | border-spacing: 0; 125 | } 126 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/css/typography.css: -------------------------------------------------------------------------------- 1 | /* Google Font's Droid Sans */ 2 | @font-face { 3 | font-family: 'Droid Sans'; 4 | font-style: normal; 5 | font-weight: 400; 6 | src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf') format('truetype'); 7 | } 8 | /* Google Font's Droid Sans Bold */ 9 | @font-face { 10 | font-family: 'Droid Sans'; 11 | font-style: normal; 12 | font-weight: 700; 13 | src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf') format('truetype'); 14 | } 15 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/fonts/DroidSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/fonts/DroidSans-Bold.ttf -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/images/collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/images/collapse.gif -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/images/expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/images/expand.gif -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/images/explorer_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/images/explorer_icons.png -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/images/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/images/favicon-16x16.png -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/images/favicon-32x32.png -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/images/favicon.ico -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/images/logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/images/logo_small.png -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/images/pet_store_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/images/pet_store_api.png -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/images/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/images/throbber.gif -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/images/wordnik_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinktecture/nodejs-aspnetcore-webapi/dd94f702a00967263f12d543126f7e3a05aadfa1/src/nodejs/WebAPI/public/docs/images/wordnik_api.png -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/en.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"Warning: Deprecated", 6 | "Implementation Notes":"Implementation Notes", 7 | "Response Class":"Response Class", 8 | "Status":"Status", 9 | "Parameters":"Parameters", 10 | "Parameter":"Parameter", 11 | "Value":"Value", 12 | "Description":"Description", 13 | "Parameter Type":"Parameter Type", 14 | "Data Type":"Data Type", 15 | "Response Messages":"Response Messages", 16 | "HTTP Status Code":"HTTP Status Code", 17 | "Reason":"Reason", 18 | "Response Model":"Response Model", 19 | "Request URL":"Request URL", 20 | "Response Body":"Response Body", 21 | "Response Code":"Response Code", 22 | "Response Headers":"Response Headers", 23 | "Hide Response":"Hide Response", 24 | "Headers":"Headers", 25 | "Try it out!":"Try it out!", 26 | "Show/Hide":"Show/Hide", 27 | "List Operations":"List Operations", 28 | "Expand Operations":"Expand Operations", 29 | "Raw":"Raw", 30 | "can't parse JSON. Raw result":"can't parse JSON. Raw result", 31 | "Model Schema":"Model Schema", 32 | "Model":"Model", 33 | "Click to set as parameter value":"Click to set as parameter value", 34 | "apply":"apply", 35 | "Username":"Username", 36 | "Password":"Password", 37 | "Terms of service":"Terms of service", 38 | "Created by":"Created by", 39 | "See more at":"See more at", 40 | "Contact the developer":"Contact the developer", 41 | "api version":"api version", 42 | "Response Content Type":"Response Content Type", 43 | "Parameter content type:":"Parameter content type:", 44 | "fetching resource":"fetching resource", 45 | "fetching resource list":"fetching resource list", 46 | "Explore":"Explore", 47 | "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis", 48 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Can't read from server. It may not have the appropriate access-control-origin settings.", 49 | "Please specify the protocol for":"Please specify the protocol for", 50 | "Can't read swagger JSON from":"Can't read swagger JSON from", 51 | "Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI", 52 | "Unable to read api":"Unable to read api", 53 | "from path":"from path", 54 | "server returned":"server returned" 55 | }); 56 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/es.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"Advertencia: Obsoleto", 6 | "Implementation Notes":"Notas de implementación", 7 | "Response Class":"Clase de la Respuesta", 8 | "Status":"Status", 9 | "Parameters":"Parámetros", 10 | "Parameter":"Parámetro", 11 | "Value":"Valor", 12 | "Description":"Descripción", 13 | "Parameter Type":"Tipo del Parámetro", 14 | "Data Type":"Tipo del Dato", 15 | "Response Messages":"Mensajes de la Respuesta", 16 | "HTTP Status Code":"Código de Status HTTP", 17 | "Reason":"Razón", 18 | "Response Model":"Modelo de la Respuesta", 19 | "Request URL":"URL de la Solicitud", 20 | "Response Body":"Cuerpo de la Respuesta", 21 | "Response Code":"Código de la Respuesta", 22 | "Response Headers":"Encabezados de la Respuesta", 23 | "Hide Response":"Ocultar Respuesta", 24 | "Try it out!":"Pruébalo!", 25 | "Show/Hide":"Mostrar/Ocultar", 26 | "List Operations":"Listar Operaciones", 27 | "Expand Operations":"Expandir Operaciones", 28 | "Raw":"Crudo", 29 | "can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo", 30 | "Model Schema":"Esquema del Modelo", 31 | "Model":"Modelo", 32 | "apply":"aplicar", 33 | "Username":"Nombre de usuario", 34 | "Password":"Contraseña", 35 | "Terms of service":"Términos de Servicio", 36 | "Created by":"Creado por", 37 | "See more at":"Ver más en", 38 | "Contact the developer":"Contactar al desarrollador", 39 | "api version":"versión de la api", 40 | "Response Content Type":"Tipo de Contenido (Content Type) de la Respuesta", 41 | "fetching resource":"buscando recurso", 42 | "fetching resource list":"buscando lista del recurso", 43 | "Explore":"Explorar", 44 | "Show Swagger Petstore Example Apis":"Mostrar Api Ejemplo de Swagger Petstore", 45 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"No se puede leer del servidor. Tal vez no tiene la configuración de control de acceso de origen (access-control-origin) apropiado.", 46 | "Please specify the protocol for":"Por favor, especificar el protocola para", 47 | "Can't read swagger JSON from":"No se puede leer el JSON de swagger desde", 48 | "Finished Loading Resource Information. Rendering Swagger UI":"Finalizada la carga del recurso de Información. Mostrando Swagger UI", 49 | "Unable to read api":"No se puede leer la api", 50 | "from path":"desde ruta", 51 | "server returned":"el servidor retornó" 52 | }); 53 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/fr.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"Avertissement : Obsolète", 6 | "Implementation Notes":"Notes d'implementation", 7 | "Response Class":"Classe de la réponse", 8 | "Status":"Statut", 9 | "Parameters":"Paramètres", 10 | "Parameter":"Paramètre", 11 | "Value":"Valeur", 12 | "Description":"Description", 13 | "Parameter Type":"Type du paramètre", 14 | "Data Type":"Type de données", 15 | "Response Messages":"Messages de la réponse", 16 | "HTTP Status Code":"Code de statut HTTP", 17 | "Reason":"Raison", 18 | "Response Model":"Modèle de réponse", 19 | "Request URL":"URL appelée", 20 | "Response Body":"Corps de la réponse", 21 | "Response Code":"Code de la réponse", 22 | "Response Headers":"En-têtes de la réponse", 23 | "Hide Response":"Cacher la réponse", 24 | "Headers":"En-têtes", 25 | "Try it out!":"Testez !", 26 | "Show/Hide":"Afficher/Masquer", 27 | "List Operations":"Liste des opérations", 28 | "Expand Operations":"Développer les opérations", 29 | "Raw":"Brut", 30 | "can't parse JSON. Raw result":"impossible de décoder le JSON. Résultat brut", 31 | "Model Schema":"Définition du modèle", 32 | "Model":"Modèle", 33 | "apply":"appliquer", 34 | "Username":"Nom d'utilisateur", 35 | "Password":"Mot de passe", 36 | "Terms of service":"Conditions de service", 37 | "Created by":"Créé par", 38 | "See more at":"Voir plus sur", 39 | "Contact the developer":"Contacter le développeur", 40 | "api version":"version de l'api", 41 | "Response Content Type":"Content Type de la réponse", 42 | "fetching resource":"récupération de la ressource", 43 | "fetching resource list":"récupération de la liste de ressources", 44 | "Explore":"Explorer", 45 | "Show Swagger Petstore Example Apis":"Montrer les Apis de l'exemple Petstore de Swagger", 46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Impossible de lire à partir du serveur. Il se peut que les réglages access-control-origin ne soient pas appropriés.", 47 | "Please specify the protocol for":"Veuillez spécifier un protocole pour", 48 | "Can't read swagger JSON from":"Impossible de lire le JSON swagger à partir de", 49 | "Finished Loading Resource Information. Rendering Swagger UI":"Chargement des informations terminé. Affichage de Swagger UI", 50 | "Unable to read api":"Impossible de lire l'api", 51 | "from path":"à partir du chemin", 52 | "server returned":"réponse du serveur" 53 | }); 54 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/it.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"Attenzione: Deprecato", 6 | "Implementation Notes":"Note di implementazione", 7 | "Response Class":"Classe della risposta", 8 | "Status":"Stato", 9 | "Parameters":"Parametri", 10 | "Parameter":"Parametro", 11 | "Value":"Valore", 12 | "Description":"Descrizione", 13 | "Parameter Type":"Tipo di parametro", 14 | "Data Type":"Tipo di dato", 15 | "Response Messages":"Messaggi della risposta", 16 | "HTTP Status Code":"Codice stato HTTP", 17 | "Reason":"Motivo", 18 | "Response Model":"Modello di risposta", 19 | "Request URL":"URL della richiesta", 20 | "Response Body":"Corpo della risposta", 21 | "Response Code":"Oggetto della risposta", 22 | "Response Headers":"Intestazioni della risposta", 23 | "Hide Response":"Nascondi risposta", 24 | "Try it out!":"Provalo!", 25 | "Show/Hide":"Mostra/Nascondi", 26 | "List Operations":"Mostra operazioni", 27 | "Expand Operations":"Espandi operazioni", 28 | "Raw":"Grezzo (raw)", 29 | "can't parse JSON. Raw result":"non è possibile parsare il JSON. Risultato grezzo (raw).", 30 | "Model Schema":"Schema del modello", 31 | "Model":"Modello", 32 | "apply":"applica", 33 | "Username":"Nome utente", 34 | "Password":"Password", 35 | "Terms of service":"Condizioni del servizio", 36 | "Created by":"Creato da", 37 | "See more at":"Informazioni aggiuntive:", 38 | "Contact the developer":"Contatta lo sviluppatore", 39 | "api version":"versione api", 40 | "Response Content Type":"Tipo di contenuto (content type) della risposta", 41 | "fetching resource":"recuperando la risorsa", 42 | "fetching resource list":"recuperando lista risorse", 43 | "Explore":"Esplora", 44 | "Show Swagger Petstore Example Apis":"Mostra le api di esempio di Swagger Petstore", 45 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Non è possibile leggere dal server. Potrebbe non avere le impostazioni di controllo accesso origine (access-control-origin) appropriate.", 46 | "Please specify the protocol for":"Si prega di specificare il protocollo per", 47 | "Can't read swagger JSON from":"Impossibile leggere JSON swagger da:", 48 | "Finished Loading Resource Information. Rendering Swagger UI":"Lettura informazioni risorse termianta. Swagger UI viene mostrata", 49 | "Unable to read api":"Impossibile leggere la api", 50 | "from path":"da cartella", 51 | "server returned":"il server ha restituito" 52 | }); 53 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/ja.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"警告: 廃止予定", 6 | "Implementation Notes":"実装メモ", 7 | "Response Class":"レスポンスクラス", 8 | "Status":"ステータス", 9 | "Parameters":"パラメータ群", 10 | "Parameter":"パラメータ", 11 | "Value":"値", 12 | "Description":"説明", 13 | "Parameter Type":"パラメータタイプ", 14 | "Data Type":"データタイプ", 15 | "Response Messages":"レスポンスメッセージ", 16 | "HTTP Status Code":"HTTPステータスコード", 17 | "Reason":"理由", 18 | "Response Model":"レスポンスモデル", 19 | "Request URL":"リクエストURL", 20 | "Response Body":"レスポンスボディ", 21 | "Response Code":"レスポンスコード", 22 | "Response Headers":"レスポンスヘッダ", 23 | "Hide Response":"レスポンスを隠す", 24 | "Headers":"ヘッダ", 25 | "Try it out!":"実際に実行!", 26 | "Show/Hide":"表示/非表示", 27 | "List Operations":"操作一覧", 28 | "Expand Operations":"操作の展開", 29 | "Raw":"Raw", 30 | "can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果", 31 | "Model Schema":"モデルスキーマ", 32 | "Model":"モデル", 33 | "apply":"実行", 34 | "Username":"ユーザ名", 35 | "Password":"パスワード", 36 | "Terms of service":"サービス利用規約", 37 | "Created by":"Created by", 38 | "See more at":"See more at", 39 | "Contact the developer":"開発者に連絡", 40 | "api version":"APIバージョン", 41 | "Response Content Type":"レスポンス コンテンツタイプ", 42 | "fetching resource":"リソースの取得", 43 | "fetching resource list":"リソース一覧の取得", 44 | "Explore":"Explore", 45 | "Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示", 46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.", 47 | "Please specify the protocol for":"プロトコルを指定してください", 48 | "Can't read swagger JSON from":"次からswagger JSONを読み込めません", 49 | "Finished Loading Resource Information. Rendering Swagger UI":"リソース情報の読み込みが完了しました. Swagger UIを描画しています", 50 | "Unable to read api":"APIを読み込めません", 51 | "from path":"次のパスから", 52 | "server returned":"サーバからの返答" 53 | }); 54 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/pl.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"Uwaga: Wycofane", 6 | "Implementation Notes":"Uwagi Implementacji", 7 | "Response Class":"Klasa Odpowiedzi", 8 | "Status":"Status", 9 | "Parameters":"Parametry", 10 | "Parameter":"Parametr", 11 | "Value":"Wartość", 12 | "Description":"Opis", 13 | "Parameter Type":"Typ Parametru", 14 | "Data Type":"Typ Danych", 15 | "Response Messages":"Wiadomości Odpowiedzi", 16 | "HTTP Status Code":"Kod Statusu HTTP", 17 | "Reason":"Przyczyna", 18 | "Response Model":"Model Odpowiedzi", 19 | "Request URL":"URL Wywołania", 20 | "Response Body":"Treść Odpowiedzi", 21 | "Response Code":"Kod Odpowiedzi", 22 | "Response Headers":"Nagłówki Odpowiedzi", 23 | "Hide Response":"Ukryj Odpowiedź", 24 | "Headers":"Nagłówki", 25 | "Try it out!":"Wypróbuj!", 26 | "Show/Hide":"Pokaż/Ukryj", 27 | "List Operations":"Lista Operacji", 28 | "Expand Operations":"Rozwiń Operacje", 29 | "Raw":"Nieprzetworzone", 30 | "can't parse JSON. Raw result":"nie można przetworzyć pliku JSON. Nieprzetworzone dane", 31 | "Model Schema":"Schemat Modelu", 32 | "Model":"Model", 33 | "apply":"użyj", 34 | "Username":"Nazwa użytkownika", 35 | "Password":"Hasło", 36 | "Terms of service":"Warunki używania", 37 | "Created by":"Utworzone przez", 38 | "See more at":"Zobacz więcej na", 39 | "Contact the developer":"Kontakt z deweloperem", 40 | "api version":"wersja api", 41 | "Response Content Type":"Typ Zasobu Odpowiedzi", 42 | "fetching resource":"ładowanie zasobu", 43 | "fetching resource list":"ładowanie listy zasobów", 44 | "Explore":"Eksploruj", 45 | "Show Swagger Petstore Example Apis":"Pokaż Przykładowe Api Swagger Petstore", 46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Brak połączenia z serwerem. Może on nie mieć odpowiednich ustawień access-control-origin.", 47 | "Please specify the protocol for":"Proszę podać protokół dla", 48 | "Can't read swagger JSON from":"Nie można odczytać swagger JSON z", 49 | "Finished Loading Resource Information. Rendering Swagger UI":"Ukończono Ładowanie Informacji o Zasobie. Renderowanie Swagger UI", 50 | "Unable to read api":"Nie można odczytać api", 51 | "from path":"ze ścieżki", 52 | "server returned":"serwer zwrócił" 53 | }); 54 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/pt.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"Aviso: Depreciado", 6 | "Implementation Notes":"Notas de Implementação", 7 | "Response Class":"Classe de resposta", 8 | "Status":"Status", 9 | "Parameters":"Parâmetros", 10 | "Parameter":"Parâmetro", 11 | "Value":"Valor", 12 | "Description":"Descrição", 13 | "Parameter Type":"Tipo de parâmetro", 14 | "Data Type":"Tipo de dados", 15 | "Response Messages":"Mensagens de resposta", 16 | "HTTP Status Code":"Código de status HTTP", 17 | "Reason":"Razão", 18 | "Response Model":"Modelo resposta", 19 | "Request URL":"URL requisição", 20 | "Response Body":"Corpo da resposta", 21 | "Response Code":"Código da resposta", 22 | "Response Headers":"Cabeçalho da resposta", 23 | "Headers":"Cabeçalhos", 24 | "Hide Response":"Esconder resposta", 25 | "Try it out!":"Tente agora!", 26 | "Show/Hide":"Mostrar/Esconder", 27 | "List Operations":"Listar operações", 28 | "Expand Operations":"Expandir operações", 29 | "Raw":"Cru", 30 | "can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru", 31 | "Model Schema":"Modelo esquema", 32 | "Model":"Modelo", 33 | "apply":"Aplicar", 34 | "Username":"Usuário", 35 | "Password":"Senha", 36 | "Terms of service":"Termos do serviço", 37 | "Created by":"Criado por", 38 | "See more at":"Veja mais em", 39 | "Contact the developer":"Contate o desenvolvedor", 40 | "api version":"Versão api", 41 | "Response Content Type":"Tipo de conteúdo da resposta", 42 | "fetching resource":"busca recurso", 43 | "fetching resource list":"buscando lista de recursos", 44 | "Explore":"Explorar", 45 | "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis", 46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Não é possível ler do servidor. Pode não ter as apropriadas configurações access-control-origin", 47 | "Please specify the protocol for":"Por favor especifique o protocolo", 48 | "Can't read swagger JSON from":"Não é possível ler o JSON Swagger de", 49 | "Finished Loading Resource Information. Rendering Swagger UI":"Carregar informação de recurso finalizada. Renderizando Swagger UI", 50 | "Unable to read api":"Não foi possível ler api", 51 | "from path":"do caminho", 52 | "server returned":"servidor retornou" 53 | }); 54 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/ru.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"Предупреждение: Устарело", 6 | "Implementation Notes":"Заметки", 7 | "Response Class":"Пример ответа", 8 | "Status":"Статус", 9 | "Parameters":"Параметры", 10 | "Parameter":"Параметр", 11 | "Value":"Значение", 12 | "Description":"Описание", 13 | "Parameter Type":"Тип параметра", 14 | "Data Type":"Тип данных", 15 | "HTTP Status Code":"HTTP код", 16 | "Reason":"Причина", 17 | "Response Model":"Структура ответа", 18 | "Request URL":"URL запроса", 19 | "Response Body":"Тело ответа", 20 | "Response Code":"HTTP код ответа", 21 | "Response Headers":"Заголовки ответа", 22 | "Hide Response":"Спрятать ответ", 23 | "Headers":"Заголовки", 24 | "Response Messages":"Что может прийти в ответ", 25 | "Try it out!":"Попробовать!", 26 | "Show/Hide":"Показать/Скрыть", 27 | "List Operations":"Операции кратко", 28 | "Expand Operations":"Операции подробно", 29 | "Raw":"В сыром виде", 30 | "can't parse JSON. Raw result":"Не удается распарсить ответ:", 31 | "Model Schema":"Структура", 32 | "Model":"Описание", 33 | "Click to set as parameter value":"Нажмите, чтобы испльзовать в качестве значения параметра", 34 | "apply":"применить", 35 | "Username":"Имя пользователя", 36 | "Password":"Пароль", 37 | "Terms of service":"Условия использования", 38 | "Created by":"Разработано", 39 | "See more at":"Еще тут", 40 | "Contact the developer":"Связаться с разработчиком", 41 | "api version":"Версия API", 42 | "Response Content Type":"Content Type ответа", 43 | "Parameter content type:":"Content Type параметра:", 44 | "fetching resource":"Получение ресурса", 45 | "fetching resource list":"Получение ресурсов", 46 | "Explore":"Показать", 47 | "Show Swagger Petstore Example Apis":"Показать примеры АПИ", 48 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Не удается получить ответ от сервера. Возможно, проблема с настройками доступа", 49 | "Please specify the protocol for":"Пожалуйста, укажите протокол для", 50 | "Can't read swagger JSON from":"Не получается прочитать swagger json из", 51 | "Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о ресурсах завершена. Рендерим", 52 | "Unable to read api":"Не удалось прочитать api", 53 | "from path":"по адресу", 54 | "server returned":"сервер сказал" 55 | }); 56 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/tr.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"Uyarı: Deprecated", 6 | "Implementation Notes":"Gerçekleştirim Notları", 7 | "Response Class":"Dönen Sınıf", 8 | "Status":"Statü", 9 | "Parameters":"Parametreler", 10 | "Parameter":"Parametre", 11 | "Value":"Değer", 12 | "Description":"Açıklama", 13 | "Parameter Type":"Parametre Tipi", 14 | "Data Type":"Veri Tipi", 15 | "Response Messages":"Dönüş Mesajı", 16 | "HTTP Status Code":"HTTP Statü Kodu", 17 | "Reason":"Gerekçe", 18 | "Response Model":"Dönüş Modeli", 19 | "Request URL":"İstek URL", 20 | "Response Body":"Dönüş İçeriği", 21 | "Response Code":"Dönüş Kodu", 22 | "Response Headers":"Dönüş Üst Bilgileri", 23 | "Hide Response":"Dönüşü Gizle", 24 | "Headers":"Üst Bilgiler", 25 | "Try it out!":"Dene!", 26 | "Show/Hide":"Göster/Gizle", 27 | "List Operations":"Operasyonları Listele", 28 | "Expand Operations":"Operasyonları Aç", 29 | "Raw":"Ham", 30 | "can't parse JSON. Raw result":"JSON çözümlenemiyor. Ham sonuç", 31 | "Model Schema":"Model Şema", 32 | "Model":"Model", 33 | "apply":"uygula", 34 | "Username":"Kullanıcı Adı", 35 | "Password":"Parola", 36 | "Terms of service":"Servis şartları", 37 | "Created by":"Oluşturan", 38 | "See more at":"Daha fazlası için", 39 | "Contact the developer":"Geliştirici ile İletişime Geçin", 40 | "api version":"api versiyon", 41 | "Response Content Type":"Dönüş İçerik Tipi", 42 | "fetching resource":"kaynak getiriliyor", 43 | "fetching resource list":"kaynak listesi getiriliyor", 44 | "Explore":"Keşfet", 45 | "Show Swagger Petstore Example Apis":"Swagger Petstore Örnek Api'yi Gör", 46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Sunucudan okuma yapılamıyor. Sunucu access-control-origin ayarlarınızı kontrol edin.", 47 | "Please specify the protocol for":"Lütfen istenen adres için protokol belirtiniz", 48 | "Can't read swagger JSON from":"Swagger JSON bu kaynaktan okunamıyor", 49 | "Finished Loading Resource Information. Rendering Swagger UI":"Kaynak baglantısı tamamlandı. Swagger UI gösterime hazırlanıyor", 50 | "Unable to read api":"api okunamadı", 51 | "from path":"yoldan", 52 | "server returned":"sunucuya dönüldü" 53 | }); 54 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/translator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Translator for documentation pages. 5 | * 6 | * To enable translation you should include one of language-files in your index.html 7 | * after . 8 | * For example - 9 | * 10 | * If you wish to translate some new texsts you should do two things: 11 | * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. 12 | * 2. Mark that text it templates this way New Phrase or . 13 | * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. 14 | * 15 | */ 16 | window.SwaggerTranslator = { 17 | 18 | _words:[], 19 | 20 | translate: function(sel) { 21 | var $this = this; 22 | sel = sel || '[data-sw-translate]'; 23 | 24 | $(sel).each(function() { 25 | $(this).html($this._tryTranslate($(this).html())); 26 | 27 | $(this).val($this._tryTranslate($(this).val())); 28 | $(this).attr('title', $this._tryTranslate($(this).attr('title'))); 29 | }); 30 | }, 31 | 32 | _tryTranslate: function(word) { 33 | return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word; 34 | }, 35 | 36 | learn: function(wordsMap) { 37 | this._words = wordsMap; 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lang/zh-cn.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* jshint quotmark: double */ 4 | window.SwaggerTranslator.learn({ 5 | "Warning: Deprecated":"警告:已过时", 6 | "Implementation Notes":"实现备注", 7 | "Response Class":"响应类", 8 | "Status":"状态", 9 | "Parameters":"参数", 10 | "Parameter":"参数", 11 | "Value":"值", 12 | "Description":"描述", 13 | "Parameter Type":"参数类型", 14 | "Data Type":"数据类型", 15 | "Response Messages":"响应消息", 16 | "HTTP Status Code":"HTTP状态码", 17 | "Reason":"原因", 18 | "Response Model":"响应模型", 19 | "Request URL":"请求URL", 20 | "Response Body":"响应体", 21 | "Response Code":"响应码", 22 | "Response Headers":"响应头", 23 | "Hide Response":"隐藏响应", 24 | "Headers":"头", 25 | "Try it out!":"试一下!", 26 | "Show/Hide":"显示/隐藏", 27 | "List Operations":"显示操作", 28 | "Expand Operations":"展开操作", 29 | "Raw":"原始", 30 | "can't parse JSON. Raw result":"无法解析JSON. 原始结果", 31 | "Model Schema":"模型架构", 32 | "Model":"模型", 33 | "apply":"应用", 34 | "Username":"用户名", 35 | "Password":"密码", 36 | "Terms of service":"服务条款", 37 | "Created by":"创建者", 38 | "See more at":"查看更多:", 39 | "Contact the developer":"联系开发者", 40 | "api version":"api版本", 41 | "Response Content Type":"响应Content Type", 42 | "fetching resource":"正在获取资源", 43 | "fetching resource list":"正在获取资源列表", 44 | "Explore":"浏览", 45 | "Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis", 46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"无法从服务器读取。可能没有正确设置access-control-origin。", 47 | "Please specify the protocol for":"请指定协议:", 48 | "Can't read swagger JSON from":"无法读取swagger JSON于", 49 | "Finished Loading Resource Information. Rendering Swagger UI":"已加载资源信息。正在渲染Swagger UI", 50 | "Unable to read api":"无法读取api", 51 | "from path":"从路径", 52 | "server returned":"服务器返回" 53 | }); 54 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lib/jquery.ba-bbq.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010 3 | * http://benalman.com/projects/jquery-bbq-plugin/ 4 | * 5 | * Copyright (c) 2010 "Cowboy" Ben Alman 6 | * Dual licensed under the MIT and GPL licenses. 7 | * http://benalman.com/about/license/ 8 | */ 9 | (function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this); -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lib/jquery.slideto.min.js: -------------------------------------------------------------------------------- 1 | (function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery); 2 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/lib/jquery.wiggle.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | jQuery Wiggle 3 | Author: WonderGroup, Jordan Thomas 4 | URL: http://labs.wondergroup.com/demos/mini-ui/index.html 5 | License: MIT (http://en.wikipedia.org/wiki/MIT_License) 6 | */ 7 | jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('
').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);} 8 | if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});}; -------------------------------------------------------------------------------- /src/nodejs/WebAPI/public/docs/o2c.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/server/referenceTokenValidation.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const request = require('request'), 4 | restify = require('restify'); 5 | 6 | /** 7 | * This class is used to validate the tokens which are sent to the Web API 8 | * 9 | * @public 10 | * @constructor 11 | */ 12 | function ReferenceTokenValidation() { 13 | // The Url where the Node STS is hosted. 14 | const authorityUrl = 'http://localhost:5001/'; 15 | 16 | // Internal method for creating a 401 Not authorized http error 17 | function notAuthorized(res) { 18 | res.send(401, new Error('Not authorized')); 19 | } 20 | 21 | /** 22 | * Returns a restify middleware to validate tokens 23 | * @returns {Function} 24 | */ 25 | this.validate = () => { 26 | return (req, res, next) => { 27 | // Don't authorise docs and swagger json 28 | if (req.url.indexOf('/docs') === 0 || req.url.indexOf('/swagger.json') === 0) { 29 | return next(); 30 | } 31 | 32 | // Get the authorization header 33 | const authorizationHeader = req.header('authorization'); 34 | 35 | // If not present, return 401 Not authorized 36 | if (!authorizationHeader) { 37 | notAuthorized(res); 38 | return next(); 39 | } 40 | 41 | // Cut the 'Bearer' part, so we only have the token 42 | const token = authorizationHeader.substr(7); 43 | 44 | // Call our STS to validate the token 45 | request(`${authorityUrl}connect/accesstokenvalidation?token=${token}`, (err, response) => { 46 | // If it returns an error or the statusCode is not 200 OK, return a 401 Not authorized 47 | if (err || response.statusCode !== 200) { 48 | notAuthorized(res); 49 | return next(); 50 | } 51 | 52 | // If everything is ok, go to the next middleware 53 | return next(); 54 | }); 55 | }; 56 | }; 57 | } 58 | 59 | module.exports = new ReferenceTokenValidation(); 60 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/service/customer.inmemory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Customer service which uses an simple object to store and retrieve data. 5 | * Provides a promise based method access. 6 | * 7 | * @public 8 | * @constructor 9 | */ 10 | function Customer() { 11 | // Internal counter for ids. "AutoInc" :-) 12 | let internalCounter = 0; 13 | 14 | // Internal storage object 15 | const internalStorage = {}; 16 | 17 | /** 18 | * Returns a list of customers 19 | * @returns {Promise} 20 | */ 21 | this.list = () => { 22 | return new Promise(resolve => { 23 | let result = []; 24 | 25 | // Run through the object's keys and put all values into an array 26 | Object.keys(internalStorage).forEach(key => { 27 | result.push(internalStorage[key]); 28 | }); 29 | 30 | resolve(result); 31 | }); 32 | }; 33 | 34 | /** 35 | * Creates a new customer 36 | * @param {string} firstName 37 | * @param {string} lastName 38 | * @returns {Promise} 39 | */ 40 | this.create = (firstName, lastName) => { 41 | return new Promise(resolve => { 42 | internalCounter++; 43 | 44 | internalStorage[internalCounter] = { 45 | firstName: firstName, 46 | lastName: lastName, 47 | id: internalCounter 48 | }; 49 | 50 | resolve(); 51 | }); 52 | }; 53 | 54 | /** 55 | * Removes a customer 56 | * @param {number} id 57 | * @returns {Promise} 58 | */ 59 | this.remove = id => { 60 | return new Promise((resolve, reject) => { 61 | if (internalStorage[id]) { 62 | delete internalStorage[id]; 63 | return resolve(); 64 | } 65 | 66 | reject('Id not found'); 67 | }); 68 | }; 69 | } 70 | 71 | module.exports = new Customer(); 72 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/service/customer.mongo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const database = require('../database/mongo'), 4 | Customer = require('../database/mongo/customerModel'); 5 | 6 | /** 7 | * @public 8 | * @constructor 9 | */ 10 | function CustomerService() { 11 | /** 12 | * Returns a list of customers 13 | * @returns {Promise} 14 | */ 15 | this.list = () => { 16 | return Customer.find(); 17 | }; 18 | 19 | /** 20 | * Creates a new customer 21 | * @param {string} firstName 22 | * @param {string} lastName 23 | * @returns {Promise} 24 | */ 25 | this.create = (firstName, lastName) => { 26 | var customer = new Customer({ 27 | firstName: firstName, 28 | lastName: lastName 29 | }); 30 | 31 | return customer.save(); 32 | }; 33 | 34 | /** 35 | * Removes a customer 36 | * @param {number} id 37 | * @returns {Promise} 38 | */ 39 | this.remove = id => { 40 | return Customer.find({ _id: id }).remove().exec(); 41 | }; 42 | } 43 | 44 | module.exports = new CustomerService(); 45 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/service/customer.postgres.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const database = require('../database/postgres'); 4 | 5 | /** 6 | * @public 7 | * @constructor 8 | */ 9 | function CustomerService() { 10 | /** 11 | * Returns a list of customers 12 | * @returns {Promise} 13 | */ 14 | this.list = () => { 15 | return database.get() 16 | .then(db => db.models.customer.findAll()); 17 | }; 18 | 19 | /** 20 | * Creates a new customer 21 | * @param {string} firstName 22 | * @param {string} lastName 23 | * @returns {Promise} 24 | */ 25 | this.create = (firstName, lastName) => { 26 | return database.get() 27 | .then(db => db.models.customer.create({ 28 | firstName: firstName, 29 | lastName: lastName 30 | })); 31 | }; 32 | 33 | /** 34 | * Removes a customer 35 | * @param {number} id 36 | * @returns {Promise} 37 | */ 38 | this.remove = id => { 39 | return database.get() 40 | .then(db => db.models.customer.findById(id)) 41 | .then(model => model.destroy()); 42 | }; 43 | } 44 | 45 | module.exports = new CustomerService(); 46 | -------------------------------------------------------------------------------- /src/nodejs/WebAPI/service/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const customerInMemoryService = require('./customer.inmemory'), 4 | globalConfig = require('../config'), 5 | customerDatabaseService = require(`./customer.${globalConfig.db.type}`); 6 | 7 | let config = {}; 8 | 9 | /** 10 | * @public 11 | * @constructor 12 | */ 13 | function Services() { 14 | this.customer = config.useInMemoryService ? customerInMemoryService : customerDatabaseService; 15 | } 16 | 17 | let servicesInstance; 18 | 19 | module.exports = { 20 | configure: (useInMemoryService) => { 21 | config.useInMemoryService = useInMemoryService; 22 | }, 23 | get: () => { 24 | if (servicesInstance) { 25 | return Promise.resolve(servicesInstance); 26 | } 27 | 28 | return new Promise(resolve => { 29 | var instance = new Services(); 30 | resolve(instance); 31 | }); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /tsConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "system", 5 | "moduleResolution": "node", 6 | "sourceMap": true, 7 | "emitDecoratorMetadata": true, 8 | "experimentalDecorators": true, 9 | "removeComments": false, 10 | "noImplicitAny": false 11 | }, 12 | "exclude": [ 13 | "node_modules", 14 | "src/nodejs", 15 | "src/aspNetCore", 16 | "typings/main", 17 | "typings/main.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ambientDependencies": { 3 | "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2" 4 | } 5 | } 6 | --------------------------------------------------------------------------------