├── .gitignore
├── LICENSE
├── Presentation
├── AzureDeployAndDebug
│ ├── AzureDeployAndDebug.html
│ ├── AzureDeployAndDebug.pptx
│ ├── AzureDeployAndDebug
│ │ ├── Demo-VSCode.md
│ │ ├── Demo-VSCommunity.md
│ │ ├── images
│ │ │ ├── VSCode
│ │ │ │ ├── checking-azure-resources.png
│ │ │ │ ├── cli-azure-interactive-login-complete.png
│ │ │ │ ├── cli-azure-interactive-login.png
│ │ │ │ ├── committing-all-changes.png
│ │ │ │ ├── creating-azure-resource-group.png
│ │ │ │ ├── creating-azure-web-app.png
│ │ │ │ ├── installing-missing-npm-packages.png
│ │ │ │ ├── pushing-changes-to-github.png
│ │ │ │ ├── selecting-github-as-source.png
│ │ │ │ ├── selecting-the-repository.png
│ │ │ │ ├── setting-up-continuos-deployment.png
│ │ │ │ ├── showing-the-deployments-blade.png
│ │ │ │ ├── showing-the-new-deployment-entry.png
│ │ │ │ ├── showing-the-updated-site.png
│ │ │ │ └── updating-the-index-view.png
│ │ │ └── VSCommunity
│ │ │ │ ├── attaching-the-debugger.png
│ │ │ │ ├── checking-azure-resources.png
│ │ │ │ ├── checking-that-the-debugger-is-working.png
│ │ │ │ ├── cli-azure-interactive-login-complete.png
│ │ │ │ ├── cli-azure-interactive-login.png
│ │ │ │ ├── could-not-attach-error.png
│ │ │ │ ├── creating-azure-resource-group.png
│ │ │ │ ├── creating-azure-web-app.png
│ │ │ │ ├── installing-missing-npm-packages.png
│ │ │ │ ├── path-too-long-warning-dialog-box.png
│ │ │ │ ├── publishing-the-web-app.png
│ │ │ │ ├── selecting-app-service-as-target.png
│ │ │ │ ├── selecting-github-as-source.png
│ │ │ │ ├── selecting-publish-from-the-menu.png
│ │ │ │ ├── selecting-the-repository.png
│ │ │ │ ├── selecting-the-target-app-service.png
│ │ │ │ ├── setting-up-continuos-deployment.png
│ │ │ │ ├── showing-the-deployments-blade.png
│ │ │ │ ├── showing-the-new-deployment-entry.png
│ │ │ │ ├── showing-the-updated-site.png
│ │ │ │ ├── streaming-logs.png
│ │ │ │ ├── testing-the-chatroom-app.png
│ │ │ │ └── updating-the-index-view.png
│ │ └── source
│ │ │ ├── Assets
│ │ │ ├── azuredeploy.json
│ │ │ └── azuredeploy.parameters.json
│ │ │ └── Begin
│ │ │ ├── .deployment
│ │ │ ├── .gitignore
│ │ │ ├── Chatroom.sln
│ │ │ ├── Chatroom
│ │ │ ├── .gitignore
│ │ │ ├── Chatroom.njsproj
│ │ │ ├── README.md
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.config
│ │ │ ├── app.js
│ │ │ ├── bin
│ │ │ │ ├── ChangeConfig.ps1
│ │ │ │ ├── download.ps1
│ │ │ │ ├── node.cmd
│ │ │ │ ├── setup_web.cmd
│ │ │ │ └── www
│ │ │ ├── docDBUtils.js
│ │ │ ├── package.json
│ │ │ ├── public
│ │ │ │ ├── javascripts
│ │ │ │ │ ├── bootstrap.min.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── jquery-2.2.0.min.js
│ │ │ │ └── stylesheets
│ │ │ │ │ ├── bootstrap-theme.min.css
│ │ │ │ │ ├── bootstrap.min.css
│ │ │ │ │ └── style.styl
│ │ │ ├── routes
│ │ │ │ ├── index.js
│ │ │ │ └── users.js
│ │ │ ├── socketio.js
│ │ │ └── views
│ │ │ │ ├── error.jade
│ │ │ │ ├── index.jade
│ │ │ │ └── layout.jade
│ │ │ └── deploy.cmd
│ └── images
│ │ ├── azure-web-apps.png
│ │ ├── continuous-deployment.png
│ │ ├── deployments.png
│ │ ├── get-started.png
│ │ ├── source-control.png
│ │ └── visual-studio-azure-service-web-apps.png
├── BuildingTheBackend
│ ├── BuildingTheBackend.html
│ ├── BuildingTheBackend.pptx
│ ├── BuildingTheBackend
│ │ ├── Demo-VSCode.md
│ │ ├── Demo-VSCommunity.md
│ │ ├── images
│ │ │ ├── VSCode
│ │ │ │ ├── copying-the-keys.png
│ │ │ │ ├── creating-a-new-documentdb-account.png
│ │ │ │ ├── creating-a-new-socketiojs-file.png
│ │ │ │ ├── installing-documentdb-package.png
│ │ │ │ ├── installing-missing-npm-packages.png
│ │ │ │ ├── installing-socket-io-package.png
│ │ │ │ ├── launching-the-app-in-debug-mode-with-vscode.png
│ │ │ │ ├── retrieving-messages-from-documentdb.png
│ │ │ │ ├── setting-up-the-env-variables.png
│ │ │ │ ├── setting-up-the-new-documentdb-account.png
│ │ │ │ ├── showing-the-package-json-file.png
│ │ │ │ └── testing-socket-io.png
│ │ │ └── VSCommunity
│ │ │ │ ├── copying-the-keys.png
│ │ │ │ ├── creating-a-new-documentdb-account.png
│ │ │ │ ├── creating-a-new-item.png
│ │ │ │ ├── creating-a-new-js-file.png
│ │ │ │ ├── installing-documentdb-package.png
│ │ │ │ ├── installing-missing-npm-packages.png
│ │ │ │ ├── installing-node-packages.png
│ │ │ │ ├── installing-socket-io-package.png
│ │ │ │ ├── opening-the-project-properties.png
│ │ │ │ ├── path-too-long-warning-dialog-box.png
│ │ │ │ ├── retrieving-messages-from-documentdb.png
│ │ │ │ ├── setting-up-the-env-variables.png
│ │ │ │ ├── setting-up-the-new-documentdb-account.png
│ │ │ │ ├── showing-the-package-json-file.png
│ │ │ │ └── testing-socket-io.png
│ │ └── source
│ │ │ ├── Begin
│ │ │ ├── Chatroom.sln
│ │ │ └── Chatroom
│ │ │ │ ├── .gitignore
│ │ │ │ ├── Chatroom.njsproj
│ │ │ │ ├── README.md
│ │ │ │ ├── app.js
│ │ │ │ ├── bin
│ │ │ │ └── www
│ │ │ │ ├── package.json
│ │ │ │ ├── public
│ │ │ │ ├── javascripts
│ │ │ │ │ ├── bootstrap.min.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── jquery-2.2.0.min.js
│ │ │ │ └── stylesheets
│ │ │ │ │ ├── bootstrap-theme.min.css
│ │ │ │ │ ├── bootstrap.min.css
│ │ │ │ │ └── style.styl
│ │ │ │ ├── routes
│ │ │ │ ├── index.js
│ │ │ │ └── users.js
│ │ │ │ └── views
│ │ │ │ ├── error.jade
│ │ │ │ ├── index.jade
│ │ │ │ └── layout.jade
│ │ │ ├── End
│ │ │ ├── Chatroom.sln
│ │ │ └── Chatroom
│ │ │ │ ├── .gitignore
│ │ │ │ ├── Chatroom.njsproj
│ │ │ │ ├── README.md
│ │ │ │ ├── app.js
│ │ │ │ ├── bin
│ │ │ │ └── www
│ │ │ │ ├── docDBUtils.js
│ │ │ │ ├── package.json
│ │ │ │ ├── public
│ │ │ │ ├── javascripts
│ │ │ │ │ ├── bootstrap.min.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── jquery-2.2.0.min.js
│ │ │ │ └── stylesheets
│ │ │ │ │ ├── bootstrap-theme.min.css
│ │ │ │ │ ├── bootstrap.min.css
│ │ │ │ │ └── style.styl
│ │ │ │ ├── routes
│ │ │ │ ├── index.js
│ │ │ │ └── users.js
│ │ │ │ ├── socketio.js
│ │ │ │ └── views
│ │ │ │ ├── error.jade
│ │ │ │ ├── index.jade
│ │ │ │ └── layout.jade
│ │ │ ├── Setup.cmd
│ │ │ └── Setup
│ │ │ ├── Cleanup.cmd
│ │ │ ├── Setup.cmd
│ │ │ ├── nodecamp-buildingthebackend-snippets
│ │ │ ├── package.json
│ │ │ └── snippets
│ │ │ │ └── snippets.json
│ │ │ └── scripts
│ │ │ ├── InstallCodeSnippets.cmd
│ │ │ ├── installCodeSnippets.ps1
│ │ │ └── snippets
│ │ │ └── BuildingTheBackend.vsi
│ └── images
│ │ ├── add-npm-module-in-visual-studio.png
│ │ ├── azure-documentdb-a-document-store.png
│ │ ├── azure-documentdb-cloud.png
│ │ └── azure-documentdb-the-basics.png
├── ConnectingFrontAndBack
│ ├── ConnectingFrontAndBack.html
│ ├── ConnectingFrontAndBack.pptx
│ ├── ConnectingFrontAndBack
│ │ ├── Demo-VSCode.md
│ │ ├── Demo-VSCommunity.md
│ │ ├── images
│ │ │ ├── VSCode
│ │ │ │ ├── creating-a-new-file.png
│ │ │ │ ├── installing-missing-npm-packages.png
│ │ │ │ ├── launching-the-app-in-debug-mode-with-vscode.png
│ │ │ │ └── running-the-solution.png
│ │ │ └── VSCommunity
│ │ │ │ ├── installing-missing-npm-packages.png
│ │ │ │ ├── path-too-long-warning-dialog-box.png
│ │ │ │ └── running-the-solution.png
│ │ └── source
│ │ │ ├── Begin
│ │ │ ├── Chatroom.sln
│ │ │ └── Chatroom
│ │ │ │ ├── .gitignore
│ │ │ │ ├── Chatroom.njsproj
│ │ │ │ ├── README.md
│ │ │ │ ├── app.js
│ │ │ │ ├── bin
│ │ │ │ └── www
│ │ │ │ ├── package.json
│ │ │ │ ├── public
│ │ │ │ ├── javascripts
│ │ │ │ │ └── bootstrap.min.js
│ │ │ │ └── stylesheets
│ │ │ │ │ ├── bootstrap-theme.min.css
│ │ │ │ │ ├── bootstrap.min.css
│ │ │ │ │ └── style.styl
│ │ │ │ ├── routes
│ │ │ │ ├── index.js
│ │ │ │ └── users.js
│ │ │ │ ├── socketio.js
│ │ │ │ └── views
│ │ │ │ ├── error.jade
│ │ │ │ ├── index.jade
│ │ │ │ └── layout.jade
│ │ │ ├── End
│ │ │ ├── Chatroom.sln
│ │ │ └── Chatroom
│ │ │ │ ├── .gitignore
│ │ │ │ ├── Chatroom.njsproj
│ │ │ │ ├── README.md
│ │ │ │ ├── app.js
│ │ │ │ ├── bin
│ │ │ │ └── www
│ │ │ │ ├── package.json
│ │ │ │ ├── public
│ │ │ │ ├── javascripts
│ │ │ │ │ ├── bootstrap.min.js
│ │ │ │ │ └── index.js
│ │ │ │ └── stylesheets
│ │ │ │ │ ├── bootstrap-theme.min.css
│ │ │ │ │ ├── bootstrap.min.css
│ │ │ │ │ └── style.styl
│ │ │ │ ├── routes
│ │ │ │ ├── index.js
│ │ │ │ └── users.js
│ │ │ │ ├── socketio.js
│ │ │ │ └── views
│ │ │ │ ├── error.jade
│ │ │ │ ├── index.jade
│ │ │ │ └── layout.jade
│ │ │ ├── Setup.cmd
│ │ │ └── Setup
│ │ │ ├── Cleanup.cmd
│ │ │ ├── Setup.cmd
│ │ │ ├── nodecamp-connectingfrontandback-snippets
│ │ │ ├── package.json
│ │ │ └── snippets
│ │ │ │ ├── javascript.json
│ │ │ │ └── snippets.json
│ │ │ └── scripts
│ │ │ ├── InstallCodeSnippets.cmd
│ │ │ ├── installCodeSnippets.ps1
│ │ │ └── snippets
│ │ │ └── ConnectingFrontAndBack.vsi
│ └── images
│ │ ├── socket-io.png
│ │ ├── with-real-time.png
│ │ └── without-real-time.png
├── CreatingTheUI
│ ├── CreatingTheUI.html
│ ├── CreatingTheUI.pptx
│ ├── CreatingTheUI
│ │ ├── Demo-VSCode.md
│ │ ├── Demo-VSCommunity.md
│ │ ├── images
│ │ │ ├── VSCode
│ │ │ │ ├── installing-missing-npm-packages.png
│ │ │ │ ├── launching-the-app-in-debug-mode-with-vscode.png
│ │ │ │ └── running-the-solution.png
│ │ │ └── VSCommunity
│ │ │ │ ├── installing-missing-npm-packages.png
│ │ │ │ ├── path-too-long-warning-dialog-box.png
│ │ │ │ └── running-the-solution.png
│ │ └── source
│ │ │ ├── Begin
│ │ │ ├── Chatroom.sln
│ │ │ └── Chatroom
│ │ │ │ ├── .gitignore
│ │ │ │ ├── Chatroom.njsproj
│ │ │ │ ├── README.md
│ │ │ │ ├── app.js
│ │ │ │ ├── bin
│ │ │ │ └── www
│ │ │ │ ├── package.json
│ │ │ │ ├── public
│ │ │ │ ├── javascripts
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── jquery-2.2.0.min.js
│ │ │ │ └── stylesheets
│ │ │ │ │ └── style.styl
│ │ │ │ ├── routes
│ │ │ │ ├── index.js
│ │ │ │ └── users.js
│ │ │ │ └── views
│ │ │ │ ├── error.jade
│ │ │ │ ├── index.jade
│ │ │ │ └── layout.jade
│ │ │ ├── End
│ │ │ ├── Chatroom.sln
│ │ │ └── Chatroom
│ │ │ │ ├── .gitignore
│ │ │ │ ├── Chatroom.njsproj
│ │ │ │ ├── README.md
│ │ │ │ ├── app.js
│ │ │ │ ├── bin
│ │ │ │ └── www
│ │ │ │ ├── package.json
│ │ │ │ ├── public
│ │ │ │ ├── fonts
│ │ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ │ └── glyphicons-halflings-regular.woff2
│ │ │ │ ├── javascripts
│ │ │ │ │ ├── bootstrap.js
│ │ │ │ │ ├── bootstrap.min.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── jquery-2.2.0.min.js
│ │ │ │ │ └── npm.js
│ │ │ │ └── stylesheets
│ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ ├── bootstrap-theme.css.map
│ │ │ │ │ ├── bootstrap-theme.min.css
│ │ │ │ │ ├── bootstrap-theme.min.css.map
│ │ │ │ │ ├── bootstrap.css
│ │ │ │ │ ├── bootstrap.css.map
│ │ │ │ │ ├── bootstrap.min.css
│ │ │ │ │ ├── bootstrap.min.css.map
│ │ │ │ │ └── style.styl
│ │ │ │ ├── routes
│ │ │ │ ├── index.js
│ │ │ │ └── users.js
│ │ │ │ └── views
│ │ │ │ ├── error.jade
│ │ │ │ ├── index.jade
│ │ │ │ └── layout.jade
│ │ │ ├── Setup
│ │ │ └── nodecamp-creatingtheui-snippets
│ │ │ │ ├── package.json
│ │ │ │ └── snippets
│ │ │ │ └── snippets.json
│ │ │ └── assets
│ │ │ └── bootstrap.zip
│ └── images
│ │ ├── bootstrap-components.png
│ │ ├── bootstrap-features.png
│ │ ├── bootstrap-visual-studio-support.png
│ │ └── get-bootstrap.png
├── IntroToExpress
│ ├── IntroToExpress.html
│ ├── IntroToExpress.pptx
│ └── IntroToExpress
│ │ ├── Demo-VSCode.md
│ │ ├── Demo-VSCommunity.md
│ │ ├── images
│ │ ├── VSCode
│ │ │ ├── contacts-route.png
│ │ │ ├── creating-a-contactjs-route-file.png
│ │ │ ├── creating-a-new-express-app.png
│ │ │ ├── launching-the-app-in-debug-mode-with-vscode.png
│ │ │ ├── opening-the-app-js-file.png
│ │ │ ├── showing-the-contacts-route.png
│ │ │ ├── showing-the-index-jade-view.png
│ │ │ ├── showing-the-index-output.png
│ │ │ ├── showing-the-index-route-file.png
│ │ │ ├── showing-the-users-output.png
│ │ │ └── showing-the-users-route-file.png
│ │ └── VSCommunity
│ │ │ ├── contacts-route.png
│ │ │ ├── creating-a-new-express-app.png
│ │ │ ├── creating-a-new-item.png
│ │ │ ├── creating-a-new-js-file.png
│ │ │ ├── opening-the-app-js-file.png
│ │ │ ├── showing-the-contacts-route.png
│ │ │ ├── showing-the-index-jade-view.png
│ │ │ ├── showing-the-index-output.png
│ │ │ ├── showing-the-index-route-file.png
│ │ │ ├── showing-the-users-output.png
│ │ │ └── showing-the-users-route-file.png
│ │ └── source
│ │ ├── End
│ │ ├── ExpressApp.sln
│ │ └── ExpressApp
│ │ │ ├── .gitignore
│ │ │ ├── ExpressApp.njsproj
│ │ │ ├── README.md
│ │ │ ├── app.js
│ │ │ ├── bin
│ │ │ └── www
│ │ │ ├── package.json
│ │ │ ├── public
│ │ │ └── stylesheets
│ │ │ │ └── style.styl
│ │ │ ├── routes
│ │ │ ├── contacts.js
│ │ │ ├── index.js
│ │ │ └── users.js
│ │ │ └── views
│ │ │ ├── error.jade
│ │ │ ├── index.jade
│ │ │ └── layout.jade
│ │ ├── Setup.cmd
│ │ └── Setup
│ │ ├── Cleanup.cmd
│ │ ├── Setup.cmd
│ │ ├── nodecamp-introtoexpress-snippets
│ │ ├── package.json
│ │ └── snippets
│ │ │ └── snippets.json
│ │ └── scripts
│ │ ├── InstallCodeSnippets.cmd
│ │ ├── installCodeSnippets.ps1
│ │ └── snippets
│ │ └── IntroductionToExpress.vsi
└── IntroToNodeJS
│ ├── IntroToNodeJS.html
│ ├── IntroToNodeJS.pptx
│ ├── IntroToNodeJS
│ ├── Demo-VSCode.md
│ ├── Demo-VSCommunity.md
│ ├── images
│ │ ├── VSCode
│ │ │ ├── creating-a-clientjs-file.png
│ │ │ ├── creating-a-new-working-directory.png
│ │ │ ├── creating-a-serverjs-file.png
│ │ │ ├── creating-the-app-js-file.png
│ │ │ ├── initializing-a-nodejs-application-with-packagejson.png
│ │ │ ├── installing-express-dependency-using-npm.png
│ │ │ ├── navigating-to-the-http-server.png
│ │ │ ├── reading-a-file-asynchronously.png
│ │ │ ├── reading-a-file-synchronously.png
│ │ │ ├── running-the-console-app.png
│ │ │ ├── running-the-http-server.png
│ │ │ ├── running-the-tcp-client.png
│ │ │ ├── running-the-tcp-server.png
│ │ │ └── showing-the-installed-dependency.png
│ │ └── VSCommunity
│ │ │ ├── creating-a-new-item.png
│ │ │ ├── creating-a-new-js-file.png
│ │ │ ├── creating-a-new-nodejs-application.png
│ │ │ ├── installing-express-dependency-using-npm.png
│ │ │ ├── installing-npm-packages-with-vs.png
│ │ │ ├── navigating-to-the-http-server.png
│ │ │ ├── opening-the-app-js-file.png
│ │ │ ├── opening-the-command-prompt.png
│ │ │ ├── reading-a-file-asynchronously.png
│ │ │ ├── reading-a-file-synchronously.png
│ │ │ ├── running-the-console-app.png
│ │ │ ├── running-the-http-server.png
│ │ │ ├── running-the-tcp-client.png
│ │ │ ├── running-the-tcp-server.png
│ │ │ ├── searching-for-express-package-in-vs.png
│ │ │ └── showing-the-installed-dependency.png
│ └── source
│ │ ├── End
│ │ ├── NodejsConsoleApp.sln
│ │ └── NodejsConsoleApp
│ │ │ ├── NodejsConsoleApp.njsproj
│ │ │ ├── README.md
│ │ │ ├── app.js
│ │ │ ├── client.js
│ │ │ ├── file-reader-async.js
│ │ │ ├── file-reader-sync.js
│ │ │ ├── package.json
│ │ │ └── server.js
│ │ ├── Setup.cmd
│ │ └── Setup
│ │ ├── Cleanup.cmd
│ │ ├── Setup.cmd
│ │ ├── nodecamp-introtonodejs-snippets
│ │ ├── package.json
│ │ └── snippets
│ │ │ └── snippets.json
│ │ └── scripts
│ │ ├── InstallCodeSnippets.cmd
│ │ ├── installCodeSnippets.ps1
│ │ └── snippets
│ │ └── NodeJsIntroduction.vsi
│ └── images
│ └── callback-insanity.png
├── README.md
├── _layouts
├── MicrosoftLogo.png
├── custom.css
├── default.html
└── reveal.js
│ ├── .bower.json
│ ├── CONTRIBUTING.md
│ ├── Gruntfile.js
│ ├── LICENSE
│ ├── README.md
│ ├── bower.json
│ ├── 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
│ ├── 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
│ ├── package.json
│ └── plugin
│ ├── highlight
│ └── highlight.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
│ ├── search
│ └── search.js
│ └── zoom-js
│ └── zoom.js
└── style.css
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Microsoft
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug.pptx
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/checking-azure-resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/checking-azure-resources.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/cli-azure-interactive-login-complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/cli-azure-interactive-login-complete.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/cli-azure-interactive-login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/cli-azure-interactive-login.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/committing-all-changes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/committing-all-changes.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/creating-azure-resource-group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/creating-azure-resource-group.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/creating-azure-web-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/creating-azure-web-app.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/installing-missing-npm-packages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/installing-missing-npm-packages.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/pushing-changes-to-github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/pushing-changes-to-github.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/selecting-github-as-source.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/selecting-github-as-source.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/selecting-the-repository.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/selecting-the-repository.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/setting-up-continuos-deployment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/setting-up-continuos-deployment.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/showing-the-deployments-blade.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/showing-the-deployments-blade.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/showing-the-new-deployment-entry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/showing-the-new-deployment-entry.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/showing-the-updated-site.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/showing-the-updated-site.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/updating-the-index-view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCode/updating-the-index-view.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/attaching-the-debugger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/attaching-the-debugger.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/checking-azure-resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/checking-azure-resources.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/checking-that-the-debugger-is-working.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/checking-that-the-debugger-is-working.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/cli-azure-interactive-login-complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/cli-azure-interactive-login-complete.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/cli-azure-interactive-login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/cli-azure-interactive-login.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/could-not-attach-error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/could-not-attach-error.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/creating-azure-resource-group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/creating-azure-resource-group.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/creating-azure-web-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/creating-azure-web-app.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/installing-missing-npm-packages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/installing-missing-npm-packages.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/path-too-long-warning-dialog-box.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/path-too-long-warning-dialog-box.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/publishing-the-web-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/publishing-the-web-app.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/selecting-app-service-as-target.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/selecting-app-service-as-target.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/selecting-github-as-source.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/selecting-github-as-source.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/selecting-publish-from-the-menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/selecting-publish-from-the-menu.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/selecting-the-repository.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/selecting-the-repository.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/selecting-the-target-app-service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/selecting-the-target-app-service.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/setting-up-continuos-deployment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/setting-up-continuos-deployment.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/showing-the-deployments-blade.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/showing-the-deployments-blade.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/showing-the-new-deployment-entry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/showing-the-new-deployment-entry.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/showing-the-updated-site.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/showing-the-updated-site.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/streaming-logs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/streaming-logs.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/testing-the-chatroom-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/testing-the-chatroom-app.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/updating-the-index-view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/images/VSCommunity/updating-the-index-view.png
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Assets/azuredeploy.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "databaseAccountName": {
6 | "value": "documentDbAccountName"
7 | },
8 | "siteName": {
9 | "value": "siteName"
10 | },
11 | "appServicePlanName": {
12 | "value": "appServicePlanName"
13 | },
14 | "siteLocation": {
15 | "value": "East US"
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/.deployment:
--------------------------------------------------------------------------------
1 | [config]
2 | command = deploy.cmd
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.24720.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "Chatroom", "Chatroom\Chatroom.njsproj", "{30BDFD08-6D08-4248-BBAD-EE680411AEA8}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {30BDFD08-6D08-4248-BBAD-EE680411AEA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {30BDFD08-6D08-4248-BBAD-EE680411AEA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {30BDFD08-6D08-4248-BBAD-EE680411AEA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {30BDFD08-6D08-4248-BBAD-EE680411AEA8}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom/.gitignore:
--------------------------------------------------------------------------------
1 | /public/stylesheets/style.css
2 |
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom/README.md:
--------------------------------------------------------------------------------
1 | # Chatroom
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
4 |
').text(msg)); 6 | $('#message-box').val(''); 7 | return false; 8 | }); 9 | socket.on('chat', function (msg) { 10 | $('#messages').append($('
').text(msg)); 11 | }); -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom/public/stylesheets/style.styl: -------------------------------------------------------------------------------- 1 | body 2 | padding: 50px 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif 4 | a 5 | color: #00B7FF 6 | 7 | html, body 8 | height: 100% 9 | 10 | .wrap 11 | min-height: 100% 12 | height: auto !important 13 | height: 100% 14 | margin: 0 auto -60px 15 | 16 | .push, .footer 17 | height: 60px 18 | 19 | .footer 20 | background-color: #f5f5f5 21 | -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function (req, res) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function (req, res) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom/socketio.js: -------------------------------------------------------------------------------- 1 | var DocumentDBClient = require('documentdb').DocumentClient; 2 | var docdbUtils = require('./docDBUtils'); 3 | 4 | module.exports = function (io, config) { 5 | io.on('connection', function (socket) { 6 | console.log('a user connected'); 7 | 8 | var docDbClient = new DocumentDBClient(process.env.DOCUMENT_DB_HOST, { 9 | masterKey: process.env.DOCUMENT_DB_AUTH_KEY 10 | }); 11 | 12 | docdbUtils.initCollection(docDbClient, 'chatroom', 'messages', function (err, collection) { 13 | if (err) { 14 | console.warn(err.message); 15 | } else { 16 | docDbClient.queryDocuments(collection._self, 'SELECT r.content FROM root r') 17 | .forEach(function (err, msg) { 18 | if (msg) { 19 | console.log('emitting chat'); 20 | socket.emit('chat', msg.content); 21 | } 22 | }); 23 | } 24 | }); 25 | 26 | socket.on('disconnect', function () { 27 | console.log('user disconnected'); 28 | }); 29 | 30 | socket.on('chat', function (msg) { 31 | docdbUtils.initCollection(docDbClient, 'chatroom', 'messages', function (err, collection) { 32 | if (err) { 33 | console.warn(err.message); 34 | } else { 35 | var documentDefinition = { content: msg }; 36 | docDbClient.createDocument(collection._self, documentDefinition, function (err, o) { 37 | if (err) { 38 | console.warn(err.message); 39 | } else { 40 | console.log("chat message inserted into db: " + msg); 41 | } 42 | }); 43 | } 44 | }); 45 | 46 | socket.broadcast.emit('chat', msg); 47 | }); 48 | }); 49 | }; -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .wrap 5 | .container-fluid 6 | h1 Welcome to the Node Chatroom 7 | #messages 8 | 9 | .push 10 | .footer 11 | .container-fluid 12 | .row 13 | .col-xs-8.col-sm-9 14 | input(type="text" id="message-box" class="form-control input-lg" placeholder="Write a message here..." rows="3") 15 | .col-xs-4.col-sm-3 16 | button#send-message-btn.btn.btn-primary.btn-lg.btn-block Send Message 17 | 18 | block body_end 19 | script(type='text/javascript' src='/javascripts/index.js') -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/AzureDeployAndDebug/source/Begin/Chatroom/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | meta(charset="utf-8") 6 | meta(http-equiv="X-UA-Compatible" content="IE=edge") 7 | link(rel='stylesheet' href='/stylesheets/bootstrap.min.css') 8 | link(rel='stylesheet' href='/stylesheets/bootstrap-theme.min.css') 9 | link(rel='stylesheet' href='/stylesheets/style.css') 10 | 11 | body 12 | block content 13 | 14 | script(type='text/javascript' src='/javascripts/jquery-2.2.0.min.js') 15 | script(type='text/javascript' src='/javascripts/bootstrap.min.js') 16 | script(type='text/javascript' src='/socket.io/socket.io.js') 17 | 18 | block body_end -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/images/azure-web-apps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/images/azure-web-apps.png -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/images/continuous-deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/images/continuous-deployment.png -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/images/deployments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/images/deployments.png -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/images/get-started.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/images/get-started.png -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/images/source-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/images/source-control.png -------------------------------------------------------------------------------- /Presentation/AzureDeployAndDebug/images/visual-studio-azure-service-web-apps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/AzureDeployAndDebug/images/visual-studio-azure-service-web-apps.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend.pptx -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/copying-the-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/copying-the-keys.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/creating-a-new-documentdb-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/creating-a-new-documentdb-account.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/creating-a-new-socketiojs-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/creating-a-new-socketiojs-file.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/installing-documentdb-package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/installing-documentdb-package.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/installing-missing-npm-packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/installing-missing-npm-packages.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/installing-socket-io-package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/installing-socket-io-package.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/launching-the-app-in-debug-mode-with-vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/launching-the-app-in-debug-mode-with-vscode.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/retrieving-messages-from-documentdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/retrieving-messages-from-documentdb.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/setting-up-the-env-variables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/setting-up-the-env-variables.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/setting-up-the-new-documentdb-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/setting-up-the-new-documentdb-account.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/showing-the-package-json-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/showing-the-package-json-file.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/testing-socket-io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCode/testing-socket-io.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/copying-the-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/copying-the-keys.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/creating-a-new-documentdb-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/creating-a-new-documentdb-account.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/creating-a-new-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/creating-a-new-item.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/creating-a-new-js-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/creating-a-new-js-file.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/installing-documentdb-package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/installing-documentdb-package.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/installing-missing-npm-packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/installing-missing-npm-packages.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/installing-node-packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/installing-node-packages.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/installing-socket-io-package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/installing-socket-io-package.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/opening-the-project-properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/opening-the-project-properties.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/path-too-long-warning-dialog-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/path-too-long-warning-dialog-box.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/retrieving-messages-from-documentdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/retrieving-messages-from-documentdb.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/setting-up-the-env-variables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/setting-up-the-env-variables.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/setting-up-the-new-documentdb-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/setting-up-the-new-documentdb-account.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/showing-the-package-json-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/showing-the-package-json-file.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/testing-socket-io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/images/VSCommunity/testing-socket-io.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "Chatroom", "Chatroom\Chatroom.njsproj", "{2DF6D017-9F2E-46C5-9C98-B4861A24430F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/.gitignore: -------------------------------------------------------------------------------- 1 | /public/stylesheets/style.css 2 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/README.md: -------------------------------------------------------------------------------- 1 | # Chatroom 2 | 3 | 4 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var favicon = require('serve-favicon'); 4 | var logger = require('morgan'); 5 | var cookieParser = require('cookie-parser'); 6 | var bodyParser = require('body-parser'); 7 | 8 | var routes = require('./routes/index'); 9 | var users = require('./routes/users'); 10 | 11 | var app = express(); 12 | 13 | // view engine setup 14 | app.set('views', path.join(__dirname, 'views')); 15 | app.set('view engine', 'jade'); 16 | 17 | // uncomment after placing your favicon in /public 18 | //app.use(favicon(__dirname + '/public/favicon.ico')); 19 | app.use(logger('dev')); 20 | app.use(bodyParser.json()); 21 | app.use(bodyParser.urlencoded({ extended: false })); 22 | app.use(cookieParser()); 23 | app.use(require('stylus').middleware(path.join(__dirname, 'public'))); 24 | app.use(express.static(path.join(__dirname, 'public'))); 25 | 26 | app.use('/', routes); 27 | app.use('/users', users); 28 | 29 | // catch 404 and forward to error handler 30 | app.use(function (req, res, next) { 31 | var err = new Error('Not Found'); 32 | err.status = 404; 33 | next(err); 34 | }); 35 | 36 | // error handlers 37 | 38 | // development error handler 39 | // will print stacktrace 40 | if (app.get('env') === 'development') { 41 | app.use(function (err, req, res, next) { 42 | res.status(err.status || 500); 43 | res.render('error', { 44 | message: err.message, 45 | error: err 46 | }); 47 | }); 48 | } 49 | 50 | // production error handler 51 | // no stacktraces leaked to user 52 | app.use(function (err, req, res, next) { 53 | res.status(err.status || 500); 54 | res.render('error', { 55 | message: err.message, 56 | error: {} 57 | }); 58 | }); 59 | 60 | 61 | module.exports = app; 62 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var debug = require('debug')('Chatroom'); 3 | var app = require('../app'); 4 | 5 | app.set('port', process.env.PORT || 3000); 6 | 7 | var server = app.listen(app.get('port'), function() { 8 | debug('Express server listening on port ' + server.address().port); 9 | }); 10 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Chatroom", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "description": "Chatroom", 9 | "author": { 10 | "name": "", 11 | "email": "" 12 | }, 13 | "dependencies": { 14 | "body-parser": "^1.15.2", 15 | "cookie-parser": "^1.4.3", 16 | "debug": "^2.2.0", 17 | "express": "~4.14.0", 18 | "jade": "^1.11.0", 19 | "morgan": "^1.7.0", 20 | "serve-favicon": "^2.3.0", 21 | "stylus": "^0.54.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/public/javascripts/index.js: -------------------------------------------------------------------------------- 1 | var socket = io(); 2 | $('#send-message-btn').click(function () { 3 | var msg = $('#message-box').val(); 4 | socket.emit('chat', msg); 5 | $('#messages').append($('
').text(msg)); 6 | $('#message-box').val(''); 7 | return false; 8 | }); 9 | socket.on('chat', function (msg) { 10 | $('#messages').append($('
').text(msg)); 11 | }); -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/public/stylesheets/style.styl: -------------------------------------------------------------------------------- 1 | body 2 | padding: 50px 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif 4 | a 5 | color: #00B7FF 6 | 7 | html, body 8 | height: 100% 9 | 10 | .wrap 11 | min-height: 100% 12 | height: auto !important 13 | height: 100% 14 | margin: 0 auto -60px 15 | 16 | .push, .footer 17 | height: 60px 18 | 19 | .footer 20 | background-color: #f5f5f5 21 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function (req, res) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function (req, res) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .wrap 5 | .container-fluid 6 | h1 Welcome to the Node Chatroom 7 | #messages 8 | 9 | .push 10 | .footer 11 | .container-fluid 12 | .row 13 | .col-xs-8.col-sm-9 14 | input(type="text" id="message-box" class="form-control input-lg" placeholder="Write a message here..." rows="3") 15 | .col-xs-4.col-sm-3 16 | button#send-message-btn.btn.btn-primary.btn-lg.btn-block Send Message 17 | 18 | block body_end 19 | script(type='text/javascript' src='/javascripts/index.js') -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Begin/Chatroom/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | meta(charset="utf-8") 6 | meta(http-equiv="X-UA-Compatible" content="IE=edge") 7 | link(rel='stylesheet' href='/stylesheets/bootstrap.min.css') 8 | link(rel='stylesheet' href='/stylesheets/bootstrap-theme.min.css') 9 | link(rel='stylesheet' href='/stylesheets/style.css') 10 | 11 | body 12 | block content 13 | 14 | script(type='text/javascript' src='/javascripts/jquery-2.2.0.min.js') 15 | script(type='text/javascript' src='/javascripts/bootstrap.min.js') 16 | script(type='text/javascript' src='/socket.io/socket.io.js') 17 | 18 | block body_end -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "Chatroom", "Chatroom\Chatroom.njsproj", "{2DF6D017-9F2E-46C5-9C98-B4861A24430F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/.gitignore: -------------------------------------------------------------------------------- 1 | /public/stylesheets/style.css 2 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/README.md: -------------------------------------------------------------------------------- 1 | # Chatroom 2 | 3 | 4 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var favicon = require('serve-favicon'); 4 | var logger = require('morgan'); 5 | var cookieParser = require('cookie-parser'); 6 | var bodyParser = require('body-parser'); 7 | 8 | var routes = require('./routes/index'); 9 | var users = require('./routes/users'); 10 | 11 | var app = express(); 12 | 13 | // view engine setup 14 | app.set('views', path.join(__dirname, 'views')); 15 | app.set('view engine', 'jade'); 16 | 17 | // uncomment after placing your favicon in /public 18 | //app.use(favicon(__dirname + '/public/favicon.ico')); 19 | app.use(logger('dev')); 20 | app.use(bodyParser.json()); 21 | app.use(bodyParser.urlencoded({ extended: false })); 22 | app.use(cookieParser()); 23 | app.use(require('stylus').middleware(path.join(__dirname, 'public'))); 24 | app.use(express.static(path.join(__dirname, 'public'))); 25 | 26 | app.use('/', routes); 27 | app.use('/users', users); 28 | 29 | // catch 404 and forward to error handler 30 | app.use(function (req, res, next) { 31 | var err = new Error('Not Found'); 32 | err.status = 404; 33 | next(err); 34 | }); 35 | 36 | // error handlers 37 | 38 | // development error handler 39 | // will print stacktrace 40 | if (app.get('env') === 'development') { 41 | app.use(function (err, req, res, next) { 42 | res.status(err.status || 500); 43 | res.render('error', { 44 | message: err.message, 45 | error: err 46 | }); 47 | }); 48 | } 49 | 50 | // production error handler 51 | // no stacktraces leaked to user 52 | app.use(function (err, req, res, next) { 53 | res.status(err.status || 500); 54 | res.render('error', { 55 | message: err.message, 56 | error: {} 57 | }); 58 | }); 59 | 60 | 61 | module.exports = app; 62 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var debug = require('debug')('Chatroom'); 3 | var app = require('../app'); 4 | 5 | app.set('port', process.env.PORT || 3000); 6 | 7 | var server = app.listen(app.get('port'), function() { 8 | debug('Express server listening on port ' + server.address().port); 9 | }); 10 | 11 | var io = require('socket.io')(server); 12 | require('../socketio')(io); 13 | 14 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Chatroom", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "description": "Chatroom", 9 | "author": { 10 | "name": "", 11 | "email": "" 12 | }, 13 | "dependencies": { 14 | "body-parser": "^1.15.2", 15 | "cookie-parser": "^1.4.3", 16 | "debug": "^2.2.0", 17 | "documentdb": "^1.10.0", 18 | "express": "^4.14.0", 19 | "jade": "^1.11.0", 20 | "morgan": "^1.7.0", 21 | "serve-favicon": "^2.3.0", 22 | "socket.io": "^1.5.0", 23 | "stylus": "^0.54.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/public/javascripts/index.js: -------------------------------------------------------------------------------- 1 | var socket = io(); 2 | $('#send-message-btn').click(function () { 3 | var msg = $('#message-box').val(); 4 | socket.emit('chat', msg); 5 | $('#messages').append($('
').text(msg)); 6 | $('#message-box').val(''); 7 | return false; 8 | }); 9 | socket.on('chat', function (msg) { 10 | $('#messages').append($('
').text(msg)); 11 | }); -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/public/stylesheets/style.styl: -------------------------------------------------------------------------------- 1 | body 2 | padding: 50px 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif 4 | a 5 | color: #00B7FF 6 | 7 | html, body 8 | height: 100% 9 | 10 | .wrap 11 | min-height: 100% 12 | height: auto !important 13 | height: 100% 14 | margin: 0 auto -60px 15 | 16 | .push, .footer 17 | height: 60px 18 | 19 | .footer 20 | background-color: #f5f5f5 21 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function (req, res) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function (req, res) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/socketio.js: -------------------------------------------------------------------------------- 1 | var DocumentDBClient = require('documentdb').DocumentClient; 2 | var docdbUtils = require('./docDBUtils'); 3 | 4 | module.exports = function (io, config) { 5 | io.on('connection', function (socket) { 6 | console.log('a user connected'); 7 | 8 | var docDbClient = new DocumentDBClient(process.env.DOCUMENT_DB_HOST, { 9 | masterKey: process.env.DOCUMENT_DB_AUTH_KEY 10 | }); 11 | 12 | docdbUtils.initCollection(docDbClient, 'chatroom', 'messages', function (err, collection) { 13 | if (err) { 14 | console.warn(err.message); 15 | } else { 16 | docDbClient.queryDocuments(collection._self, 'SELECT r.content FROM root r') 17 | .forEach(function (err, msg) { 18 | if (msg) { 19 | console.log('emitting chat'); 20 | socket.emit('chat', msg.content); 21 | } 22 | }); 23 | } 24 | }); 25 | 26 | socket.on('disconnect', function () { 27 | console.log('user disconnected'); 28 | }); 29 | 30 | socket.on('chat', function (msg) { 31 | docdbUtils.initCollection(docDbClient, 'chatroom', 'messages', function (err, collection) { 32 | if (err) { 33 | console.warn(err.message); 34 | } else { 35 | var documentDefinition = { content: msg }; 36 | docDbClient.createDocument(collection._self, documentDefinition, function (err, o) { 37 | if (err) { 38 | console.warn(err.message); 39 | } else { 40 | console.log("chat message inserted into db: " + msg); 41 | } 42 | }); 43 | } 44 | }); 45 | 46 | socket.broadcast.emit('chat', msg); 47 | }); 48 | }); 49 | }; -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .wrap 5 | .container-fluid 6 | h1 Welcome to the Node Chatroom 7 | #messages 8 | 9 | .push 10 | .footer 11 | .container-fluid 12 | .row 13 | .col-xs-8.col-sm-9 14 | input(type="text" id="message-box" class="form-control input-lg" placeholder="Write a message here..." rows="3") 15 | .col-xs-4.col-sm-3 16 | button#send-message-btn.btn.btn-primary.btn-lg.btn-block Send Message 17 | 18 | block body_end 19 | script(type='text/javascript' src='/javascripts/index.js') -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/End/Chatroom/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | meta(charset="utf-8") 6 | meta(http-equiv="X-UA-Compatible" content="IE=edge") 7 | link(rel='stylesheet' href='/stylesheets/bootstrap.min.css') 8 | link(rel='stylesheet' href='/stylesheets/bootstrap-theme.min.css') 9 | link(rel='stylesheet' href='/stylesheets/style.css') 10 | 11 | body 12 | block content 13 | 14 | script(type='text/javascript' src='/javascripts/jquery-2.2.0.min.js') 15 | script(type='text/javascript' src='/javascripts/bootstrap.min.js') 16 | script(type='text/javascript' src='/socket.io/socket.io.js') 17 | 18 | block body_end -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Setup.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | CD /d "%~dp0" 4 | 5 | ::Test If script has Admin Priviledges/is elevated 6 | REG QUERY "HKU\S-1-5-19" 7 | IF %ERRORLEVEL% NEQ 0 ( 8 | ECHO Please run this script as an administrator 9 | pause 10 | EXIT /B 1 11 | ) 12 | cls 13 | echo Setup Options 14 | echo ============= 15 | echo. 16 | echo 1. Execute setup scripts. 17 | echo WARNING: The setup could fail and the Demo might not work properly if you don't have all the prerequisites installed. 18 | echo. 19 | echo 2. Exit. 20 | echo. 21 | choice /c:12 /M "Choose an option: " 22 | if errorlevel 2 goto exit 23 | if errorlevel 1 goto execsetup 24 | 25 | 26 | :execsetup 27 | REM Here executes the Setup.cmd only. 28 | echo Executing setup scripts. 29 | call .\Setup\Setup.cmd 30 | goto exit 31 | 32 | :pause 33 | pause 34 | 35 | :exit 36 | 37 | 38 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Setup/Cleanup.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo. 3 | echo ====================================================== 4 | echo Uninstall Visual Studio Code Snippets for the demo 5 | echo ====================================================== 6 | echo. 7 | 8 | for /f "tokens=2,*" %%a in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal" 2^>NUL ^| findstr Personal') do set MyDocuments=%%b 9 | 10 | DEL "%MyDocuments%\Visual Studio 2015\Code Snippets\JavaScript\My Code Snippets\BuildingTheBackend*.snippet" 2>NUL 11 | 12 | echo Demo Code Snippets have been removed! 13 | PAUSE 14 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Setup/Setup.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | %~d0 3 | 4 | CD "%~dp0" 5 | ECHO Install Visual Studio 2015 Code Snippets for the demo: 6 | ECHO ------------------------------------------------------------------------------- 7 | CALL .\Scripts\InstallCodeSnippets.cmd 8 | ECHO Done! 9 | ECHO. 10 | ECHO ******************************************************************************* 11 | ECHO. 12 | 13 | @PAUSE 14 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Setup/nodecamp-buildingthebackend-snippets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodecamp-buildingthebackend-snippets", 3 | "displayName": "Node Camp - Building The Backend - Code Snippets", 4 | "description": "Code snippets for the 'Building The Backend' Node Camp demo", 5 | "version": "1.0.0", 6 | "publisher": "MicrosoftDX", 7 | "engines": { 8 | "vscode": "^0.10.1" 9 | }, 10 | "categories": [ 11 | "Snippets" 12 | ], 13 | "contributes": { 14 | "snippets": [ 15 | { 16 | "language": "javascript", 17 | "path": "./snippets/snippets.json" 18 | } 19 | ] 20 | } 21 | } -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Setup/scripts/InstallCodeSnippets.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | %~d0 3 | cd "%~dp0" 4 | 5 | echo. 6 | echo ================================================ 7 | echo Install Visual Studio Code Snippets for the demo 8 | echo ================================================ 9 | echo. 10 | 11 | IF EXIST %WINDIR%\SysWow64 ( 12 | set powerShellDir=%WINDIR%\SysWow64\windowspowershell\v1.0 13 | ) ELSE ( 14 | set powerShellDir=%WINDIR%\system32\windowspowershell\v1.0 15 | ) 16 | 17 | call %powerShellDir%\powershell.exe -Command Set-ExecutionPolicy unrestricted 18 | 19 | call %powerShellDir%\powershell.exe -Command "&'.\installCodeSnippets.ps1' '%~dp0snippets\BuildingTheBackend.vsi'" 20 | -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/BuildingTheBackend/source/Setup/scripts/snippets/BuildingTheBackend.vsi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/BuildingTheBackend/source/Setup/scripts/snippets/BuildingTheBackend.vsi -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/images/add-npm-module-in-visual-studio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/images/add-npm-module-in-visual-studio.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/images/azure-documentdb-a-document-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/images/azure-documentdb-a-document-store.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/images/azure-documentdb-cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/images/azure-documentdb-cloud.png -------------------------------------------------------------------------------- /Presentation/BuildingTheBackend/images/azure-documentdb-the-basics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/BuildingTheBackend/images/azure-documentdb-the-basics.png -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack.pptx -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCode/creating-a-new-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCode/creating-a-new-file.png -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCode/installing-missing-npm-packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCode/installing-missing-npm-packages.png -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCode/launching-the-app-in-debug-mode-with-vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCode/launching-the-app-in-debug-mode-with-vscode.png -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCode/running-the-solution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCode/running-the-solution.png -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCommunity/installing-missing-npm-packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCommunity/installing-missing-npm-packages.png -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCommunity/path-too-long-warning-dialog-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCommunity/path-too-long-warning-dialog-box.png -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCommunity/running-the-solution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/images/VSCommunity/running-the-solution.png -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "Chatroom", "Chatroom\Chatroom.njsproj", "{2DF6D017-9F2E-46C5-9C98-B4861A24430F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/.gitignore: -------------------------------------------------------------------------------- 1 | /public/stylesheets/style.css 2 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/README.md: -------------------------------------------------------------------------------- 1 | # Chatroom 2 | 3 | 4 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var favicon = require('serve-favicon'); 4 | var logger = require('morgan'); 5 | var cookieParser = require('cookie-parser'); 6 | var bodyParser = require('body-parser'); 7 | 8 | var routes = require('./routes/index'); 9 | var users = require('./routes/users'); 10 | 11 | var app = express(); 12 | 13 | // view engine setup 14 | app.set('views', path.join(__dirname, 'views')); 15 | app.set('view engine', 'jade'); 16 | 17 | // uncomment after placing your favicon in /public 18 | //app.use(favicon(__dirname + '/public/favicon.ico')); 19 | app.use(logger('dev')); 20 | app.use(bodyParser.json()); 21 | app.use(bodyParser.urlencoded({ extended: false })); 22 | app.use(cookieParser()); 23 | app.use(require('stylus').middleware(path.join(__dirname, 'public'))); 24 | app.use(express.static(path.join(__dirname, 'public'))); 25 | 26 | app.use('/', routes); 27 | app.use('/users', users); 28 | 29 | // catch 404 and forward to error handler 30 | app.use(function (req, res, next) { 31 | var err = new Error('Not Found'); 32 | err.status = 404; 33 | next(err); 34 | }); 35 | 36 | // error handlers 37 | 38 | // development error handler 39 | // will print stacktrace 40 | if (app.get('env') === 'development') { 41 | app.use(function (err, req, res, next) { 42 | res.status(err.status || 500); 43 | res.render('error', { 44 | message: err.message, 45 | error: err 46 | }); 47 | }); 48 | } 49 | 50 | // production error handler 51 | // no stacktraces leaked to user 52 | app.use(function (err, req, res, next) { 53 | res.status(err.status || 500); 54 | res.render('error', { 55 | message: err.message, 56 | error: {} 57 | }); 58 | }); 59 | 60 | 61 | module.exports = app; 62 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var debug = require('debug')('Chatroom'); 3 | var app = require('../app'); 4 | 5 | app.set('port', process.env.PORT || 3000); 6 | 7 | var server = app.listen(app.get('port'), function() { 8 | debug('Express server listening on port ' + server.address().port); 9 | }); 10 | 11 | var io = require('socket.io')(server); 12 | require('../socketio')(io); 13 | 14 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Chatroom", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "description": "Chatroom", 9 | "author": { 10 | "name": "", 11 | "email": "" 12 | }, 13 | "dependencies": { 14 | "body-parser": "^1.8.4", 15 | "cookie-parser": "^1.4.1", 16 | "debug": "^2.2.0", 17 | "express": "^4.9.8", 18 | "jade": "^1.11.0", 19 | "morgan": "^1.6.1", 20 | "serve-favicon": "^2.1.7", 21 | "socket.io": "^1.4.4", 22 | "stylus": "^0.42.3" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/public/stylesheets/style.styl: -------------------------------------------------------------------------------- 1 | body 2 | padding: 50px 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif 4 | a 5 | color: #00B7FF 6 | 7 | html, body 8 | height: 100% 9 | 10 | .wrap 11 | min-height: 100% 12 | height: auto !important 13 | height: 100% 14 | margin: 0 auto -60px 15 | 16 | .push, .footer 17 | height: 60px 18 | 19 | .footer 20 | background-color: #f5f5f5 21 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function (req, res) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function (req, res) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/socketio.js: -------------------------------------------------------------------------------- 1 | module.exports = function (io, config) { 2 | io.on('connection', function (socket) { 3 | console.log('a user connected'); 4 | 5 | socket.on('disconnect', function () { 6 | console.log('user disconnected'); 7 | }); 8 | 9 | socket.on('chat', function (msg) { 10 | socket.broadcast.emit('chat', msg); 11 | }); 12 | }); 13 | }; -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .wrap 5 | .container-fluid 6 | h1 Welcome to the Node Chatroom 7 | #messages 8 | 9 | .push 10 | .footer 11 | .container-fluid 12 | .row 13 | .col-xs-8.col-sm-9 14 | input(type="text" id="message-box" class="form-control input-lg" placeholder="Write a message here..." rows="3") 15 | .col-xs-4.col-sm-3 16 | button#send-message-btn.btn.btn-primary.btn-lg.btn-block Send Message 17 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Begin/Chatroom/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | meta(charset="utf-8") 6 | meta(http-equiv="X-UA-Compatible" content="IE=edge") 7 | link(rel='stylesheet' href='/stylesheets/bootstrap.min.css') 8 | link(rel='stylesheet' href='/stylesheets/bootstrap-theme.min.css') 9 | link(rel='stylesheet' href='/stylesheets/style.css') 10 | 11 | body 12 | block content 13 | 14 | block body_end -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "Chatroom", "Chatroom\Chatroom.njsproj", "{2DF6D017-9F2E-46C5-9C98-B4861A24430F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/.gitignore: -------------------------------------------------------------------------------- 1 | /public/stylesheets/style.css 2 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/README.md: -------------------------------------------------------------------------------- 1 | # Chatroom 2 | 3 | 4 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var favicon = require('serve-favicon'); 4 | var logger = require('morgan'); 5 | var cookieParser = require('cookie-parser'); 6 | var bodyParser = require('body-parser'); 7 | 8 | var routes = require('./routes/index'); 9 | var users = require('./routes/users'); 10 | 11 | var app = express(); 12 | 13 | // view engine setup 14 | app.set('views', path.join(__dirname, 'views')); 15 | app.set('view engine', 'jade'); 16 | 17 | // uncomment after placing your favicon in /public 18 | //app.use(favicon(__dirname + '/public/favicon.ico')); 19 | app.use(logger('dev')); 20 | app.use(bodyParser.json()); 21 | app.use(bodyParser.urlencoded({ extended: false })); 22 | app.use(cookieParser()); 23 | app.use(require('stylus').middleware(path.join(__dirname, 'public'))); 24 | app.use(express.static(path.join(__dirname, 'public'))); 25 | 26 | app.use('/', routes); 27 | app.use('/users', users); 28 | 29 | // catch 404 and forward to error handler 30 | app.use(function (req, res, next) { 31 | var err = new Error('Not Found'); 32 | err.status = 404; 33 | next(err); 34 | }); 35 | 36 | // error handlers 37 | 38 | // development error handler 39 | // will print stacktrace 40 | if (app.get('env') === 'development') { 41 | app.use(function (err, req, res, next) { 42 | res.status(err.status || 500); 43 | res.render('error', { 44 | message: err.message, 45 | error: err 46 | }); 47 | }); 48 | } 49 | 50 | // production error handler 51 | // no stacktraces leaked to user 52 | app.use(function (err, req, res, next) { 53 | res.status(err.status || 500); 54 | res.render('error', { 55 | message: err.message, 56 | error: {} 57 | }); 58 | }); 59 | 60 | 61 | module.exports = app; 62 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var debug = require('debug')('Chatroom'); 3 | var app = require('../app'); 4 | 5 | app.set('port', process.env.PORT || 3000); 6 | 7 | var server = app.listen(app.get('port'), function() { 8 | debug('Express server listening on port ' + server.address().port); 9 | }); 10 | 11 | var io = require('socket.io')(server); 12 | require('../socketio')(io); 13 | 14 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Chatroom", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "description": "Chatroom", 9 | "author": { 10 | "name": "", 11 | "email": "" 12 | }, 13 | "dependencies": { 14 | "body-parser": "^1.8.4", 15 | "cookie-parser": "^1.4.1", 16 | "debug": "^2.2.0", 17 | "express": "^4.9.8", 18 | "jade": "^1.11.0", 19 | "morgan": "^1.6.1", 20 | "serve-favicon": "^2.1.7", 21 | "socket.io": "^1.4.4", 22 | "stylus": "^0.42.3" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/public/javascripts/index.js: -------------------------------------------------------------------------------- 1 | var socket = io(); 2 | 3 | $('#send-message-btn').click(function () { 4 | var msg = $('#message-box').val(); 5 | socket.emit('chat', msg); 6 | $('#messages').append($('
').text(msg)); 7 | $('#message-box').val(''); 8 | return false; 9 | }); 10 | 11 | socket.on('chat', function (msg) { 12 | $('#messages').append($('
').text(msg)); 13 | }); -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/public/stylesheets/style.styl: -------------------------------------------------------------------------------- 1 | body 2 | padding: 50px 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif 4 | a 5 | color: #00B7FF 6 | 7 | html, body 8 | height: 100% 9 | 10 | .wrap 11 | min-height: 100% 12 | height: auto !important 13 | height: 100% 14 | margin: 0 auto -60px 15 | 16 | .push, .footer 17 | height: 60px 18 | 19 | .footer 20 | background-color: #f5f5f5 21 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function (req, res) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function (req, res) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/socketio.js: -------------------------------------------------------------------------------- 1 | module.exports = function (io, config) { 2 | io.on('connection', function (socket) { 3 | console.log('a user connected'); 4 | 5 | socket.on('disconnect', function () { 6 | console.log('user disconnected'); 7 | }); 8 | 9 | socket.on('chat', function (msg) { 10 | socket.broadcast.emit('chat', msg); 11 | }); 12 | }); 13 | }; -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .wrap 5 | .container-fluid 6 | h1 Welcome to the Node Chatroom 7 | #messages 8 | 9 | .push 10 | .footer 11 | .container-fluid 12 | .row 13 | .col-xs-8.col-sm-9 14 | input(type="text" id="message-box" class="form-control input-lg" placeholder="Write a message here..." rows="3") 15 | .col-xs-4.col-sm-3 16 | button#send-message-btn.btn.btn-primary.btn-lg.btn-block Send Message 17 | 18 | block body_end 19 | script(type='text/javascript' src='/javascripts/index.js') -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/End/Chatroom/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | meta(charset="utf-8") 6 | meta(http-equiv="X-UA-Compatible" content="IE=edge") 7 | link(rel='stylesheet' href='/stylesheets/bootstrap.min.css') 8 | link(rel='stylesheet' href='/stylesheets/bootstrap-theme.min.css') 9 | link(rel='stylesheet' href='/stylesheets/style.css') 10 | 11 | body 12 | block content 13 | 14 | script(type='text/javascript' src='http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.1.min.js') 15 | script(type='text/javascript' src='/javascripts/bootstrap.min.js') 16 | script(type='text/javascript' src='/socket.io/socket.io.js') 17 | 18 | block body_end -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Setup.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | CD /d "%~dp0" 4 | 5 | ::Test If script has Admin Priviledges/is elevated 6 | REG QUERY "HKU\S-1-5-19" 7 | IF %ERRORLEVEL% NEQ 0 ( 8 | ECHO Please run this script as an administrator 9 | pause 10 | EXIT /B 1 11 | ) 12 | cls 13 | echo Setup Options 14 | echo ============= 15 | echo. 16 | echo 1. Execute setup scripts. 17 | echo WARNING: The setup could fail and the Demo might not work properly if you don't have all the prerequisites installed. 18 | echo. 19 | echo 2. Exit. 20 | echo. 21 | choice /c:12 /M "Choose an option: " 22 | if errorlevel 2 goto exit 23 | if errorlevel 1 goto execsetup 24 | 25 | 26 | :execsetup 27 | REM Here executes the Setup.cmd only. 28 | echo Executing setup scripts. 29 | call .\Setup\Setup.cmd 30 | goto exit 31 | 32 | :pause 33 | pause 34 | 35 | :exit 36 | 37 | 38 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Setup/Cleanup.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo. 3 | echo ====================================================== 4 | echo Uninstall Visual Studio Code Snippets for the demo 5 | echo ====================================================== 6 | echo. 7 | 8 | for /f "tokens=2,*" %%a in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal" 2^>NUL ^| findstr Personal') do set MyDocuments=%%b 9 | 10 | DEL "%MyDocuments%\Visual Studio 2015\Code Snippets\JavaScript\My Code Snippets\ConnectingFrontAndBack*.snippet" 2>NUL 11 | 12 | echo Demo Code Snippets have been removed! 13 | PAUSE 14 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Setup/Setup.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | %~d0 3 | 4 | CD "%~dp0" 5 | ECHO Install Visual Studio 2015 Code Snippets for the demo: 6 | ECHO ------------------------------------------------------------------------------- 7 | CALL .\Scripts\InstallCodeSnippets.cmd 8 | ECHO Done! 9 | ECHO. 10 | ECHO ******************************************************************************* 11 | ECHO. 12 | 13 | @PAUSE 14 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Setup/nodecamp-connectingfrontandback-snippets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodecamp-connectingfrontandback-snippets", 3 | "displayName": "Node Camp - Connecting the Frontend to the Backend - Code Snippets", 4 | "description": "Code snippets for the 'Connecting the Frontend to the Backend' Node Camp demo", 5 | "version": "1.0.0", 6 | "publisher": "MicrosoftDX", 7 | "engines": { 8 | "vscode": "^0.10.1" 9 | }, 10 | "categories": [ 11 | "Snippets" 12 | ], 13 | "contributes": { 14 | "snippets": [ 15 | { 16 | "language": "jade", 17 | "path": "./snippets/snippets.json" 18 | }, 19 | { 20 | "language": "javascript", 21 | "path": "./snippets/javascript.json" 22 | } 23 | ] 24 | } 25 | } -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Setup/nodecamp-connectingfrontandback-snippets/snippets/javascript.json: -------------------------------------------------------------------------------- 1 | { 2 | "Connecting The Frontend To The Backend Socket IO": { 3 | "prefix": "ConnectingFrontAndBack - SocketIO", 4 | "body": [ 5 | "var socket = io();" 6 | ], 7 | "description": "Connecting The Frontend To The Backend Socket IO" 8 | }, 9 | "Connecting The Frontend To The Backend Append Messages Received": { 10 | "prefix": "ConnectingFrontAndBack - AppendMessagesReceived", 11 | "body": [ 12 | "socket.on('chat', function (msg) {", 13 | "\t$('#messages').append($('
').text(msg));", 14 | "});" 15 | ], 16 | "description": "Connecting The Frontend To The Backend Append Messages Received" 17 | }, 18 | "Connecting The Frontend To The Backend Send Messages": { 19 | "prefix": "ConnectingFrontAndBack - SendMessages", 20 | "body": [ 21 | "$('#send-message-btn').click(function () {", 22 | "\tvar msg = $('#message-box').val();", 23 | "\tsocket.emit('chat', msg);", 24 | "\t$('#messages').append($('
').text(msg));", 25 | "\t$('#message-box').val('');", 26 | "\treturn false;", 27 | "});" 28 | ], 29 | "description": "Connecting The Frontend To The Backend Send Messages" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Setup/nodecamp-connectingfrontandback-snippets/snippets/snippets.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "Connecting The Frontend To The Backend Add JQuery Lib to Frontend": { 4 | "prefix": "ConnectingFrontAndBack - AddJQueryLib", 5 | "body": [ 6 | "script(type='text/javascript' src='http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.1.min.js')" 7 | ], 8 | "description": "Connecting The Frontend To The Backend Add JQuery Lib to Frontend" 9 | }, 10 | "Connecting The Frontend To The Backend Add Bootstrap and Socket.IO libs": { 11 | "prefix": "ConnectingFrontAndBack - AddBootstrapAndSocketIOLibs", 12 | "body": [ 13 | "script(type='text/javascript' src='/javascripts/bootstrap.min.js')", 14 | "script(type='text/javascript' src='/socket.io/socket.io.js')" 15 | ], 16 | "description": "Connecting The Frontend To The Backend Add Bootstrap and Socket.IO libs" 17 | }, 18 | "Connecting The Frontend To The Backend Include index.js file": { 19 | "prefix": "ConnectingFrontAndBack - IncludeIndexFile", 20 | "body": [ 21 | "block body_end", 22 | "\tscript(type='text/javascript' src='/javascripts/index.js')" 23 | ], 24 | "description": "Connecting The Frontend To The Backend Include index.js file" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Setup/scripts/InstallCodeSnippets.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | %~d0 3 | cd "%~dp0" 4 | 5 | echo. 6 | echo ================================================ 7 | echo Install Visual Studio Code Snippets for the demo 8 | echo ================================================ 9 | echo. 10 | 11 | IF EXIST %WINDIR%\SysWow64 ( 12 | set powerShellDir=%WINDIR%\SysWow64\windowspowershell\v1.0 13 | ) ELSE ( 14 | set powerShellDir=%WINDIR%\system32\windowspowershell\v1.0 15 | ) 16 | 17 | call %powerShellDir%\powershell.exe -Command Set-ExecutionPolicy unrestricted 18 | 19 | call %powerShellDir%\powershell.exe -Command "&'.\installCodeSnippets.ps1' '%~dp0snippets\ConnectingFrontAndBack.vsi'" 20 | -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Setup/scripts/snippets/ConnectingFrontAndBack.vsi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/ConnectingFrontAndBack/source/Setup/scripts/snippets/ConnectingFrontAndBack.vsi -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/images/socket-io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/images/socket-io.png -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/images/with-real-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/images/with-real-time.png -------------------------------------------------------------------------------- /Presentation/ConnectingFrontAndBack/images/without-real-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/ConnectingFrontAndBack/images/without-real-time.png -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI.pptx -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/images/VSCode/installing-missing-npm-packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/images/VSCode/installing-missing-npm-packages.png -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/images/VSCode/launching-the-app-in-debug-mode-with-vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/images/VSCode/launching-the-app-in-debug-mode-with-vscode.png -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/images/VSCode/running-the-solution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/images/VSCode/running-the-solution.png -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/images/VSCommunity/installing-missing-npm-packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/images/VSCommunity/installing-missing-npm-packages.png -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/images/VSCommunity/path-too-long-warning-dialog-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/images/VSCommunity/path-too-long-warning-dialog-box.png -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/images/VSCommunity/running-the-solution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/images/VSCommunity/running-the-solution.png -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "Chatroom", "Chatroom\Chatroom.njsproj", "{2DF6D017-9F2E-46C5-9C98-B4861A24430F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/.gitignore: -------------------------------------------------------------------------------- 1 | /public/stylesheets/style.css 2 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/README.md: -------------------------------------------------------------------------------- 1 | # Chatroom 2 | 3 | 4 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var favicon = require('serve-favicon'); 4 | var logger = require('morgan'); 5 | var cookieParser = require('cookie-parser'); 6 | var bodyParser = require('body-parser'); 7 | 8 | var routes = require('./routes/index'); 9 | var users = require('./routes/users'); 10 | 11 | var app = express(); 12 | 13 | // view engine setup 14 | app.set('views', path.join(__dirname, 'views')); 15 | app.set('view engine', 'jade'); 16 | 17 | // uncomment after placing your favicon in /public 18 | //app.use(favicon(__dirname + '/public/favicon.ico')); 19 | app.use(logger('dev')); 20 | app.use(bodyParser.json()); 21 | app.use(bodyParser.urlencoded({ extended: false })); 22 | app.use(cookieParser()); 23 | app.use(require('stylus').middleware(path.join(__dirname, 'public'))); 24 | app.use(express.static(path.join(__dirname, 'public'))); 25 | 26 | app.use('/', routes); 27 | app.use('/users', users); 28 | 29 | // catch 404 and forward to error handler 30 | app.use(function (req, res, next) { 31 | var err = new Error('Not Found'); 32 | err.status = 404; 33 | next(err); 34 | }); 35 | 36 | // error handlers 37 | 38 | // development error handler 39 | // will print stacktrace 40 | if (app.get('env') === 'development') { 41 | app.use(function (err, req, res, next) { 42 | res.status(err.status || 500); 43 | res.render('error', { 44 | message: err.message, 45 | error: err 46 | }); 47 | }); 48 | } 49 | 50 | // production error handler 51 | // no stacktraces leaked to user 52 | app.use(function (err, req, res, next) { 53 | res.status(err.status || 500); 54 | res.render('error', { 55 | message: err.message, 56 | error: {} 57 | }); 58 | }); 59 | 60 | 61 | module.exports = app; 62 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var debug = require('debug')('Chatroom'); 3 | var app = require('../app'); 4 | 5 | app.set('port', process.env.PORT || 3000); 6 | 7 | var server = app.listen(app.get('port'), function() { 8 | debug('Express server listening on port ' + server.address().port); 9 | }); 10 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Chatroom", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "description": "Chatroom", 9 | "author": { 10 | "name": "", 11 | "email": "" 12 | }, 13 | "dependencies": { 14 | "body-parser": "^1.8.4", 15 | "cookie-parser": "^1.4.1", 16 | "debug": "^2.2.0", 17 | "express": "^4.9.8", 18 | "jade": "^1.11.0", 19 | "morgan": "^1.6.1", 20 | "serve-favicon": "^2.1.7", 21 | "stylus": "^0.42.3" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/public/javascripts/index.js: -------------------------------------------------------------------------------- 1 | $('#send-message-btn').click(function () { 2 | var msg = $('#message-box').val(); 3 | $('#messages').append($('
').text(msg)); 4 | $('#message-box').val(''); 5 | return false; 6 | }); -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/public/stylesheets/style.styl: -------------------------------------------------------------------------------- 1 | body 2 | padding: 50px 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif 4 | a 5 | color: #00B7FF 6 | 7 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function (req, res) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function (req, res) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Begin/Chatroom/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet' href='/stylesheets/style.css') 6 | 7 | body 8 | block content 9 | 10 | script(type='text/javascript' src='/javascripts/jquery-2.2.0.min.js') -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "Chatroom", "Chatroom\Chatroom.njsproj", "{2DF6D017-9F2E-46C5-9C98-B4861A24430F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2DF6D017-9F2E-46C5-9C98-B4861A24430F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/.gitignore: -------------------------------------------------------------------------------- 1 | /public/stylesheets/style.css 2 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/README.md: -------------------------------------------------------------------------------- 1 | # Chatroom 2 | 3 | 4 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var favicon = require('serve-favicon'); 4 | var logger = require('morgan'); 5 | var cookieParser = require('cookie-parser'); 6 | var bodyParser = require('body-parser'); 7 | 8 | var routes = require('./routes/index'); 9 | var users = require('./routes/users'); 10 | 11 | var app = express(); 12 | 13 | // view engine setup 14 | app.set('views', path.join(__dirname, 'views')); 15 | app.set('view engine', 'jade'); 16 | 17 | // uncomment after placing your favicon in /public 18 | //app.use(favicon(__dirname + '/public/favicon.ico')); 19 | app.use(logger('dev')); 20 | app.use(bodyParser.json()); 21 | app.use(bodyParser.urlencoded({ extended: false })); 22 | app.use(cookieParser()); 23 | app.use(require('stylus').middleware(path.join(__dirname, 'public'))); 24 | app.use(express.static(path.join(__dirname, 'public'))); 25 | 26 | app.use('/', routes); 27 | app.use('/users', users); 28 | 29 | // catch 404 and forward to error handler 30 | app.use(function (req, res, next) { 31 | var err = new Error('Not Found'); 32 | err.status = 404; 33 | next(err); 34 | }); 35 | 36 | // error handlers 37 | 38 | // development error handler 39 | // will print stacktrace 40 | if (app.get('env') === 'development') { 41 | app.use(function (err, req, res, next) { 42 | res.status(err.status || 500); 43 | res.render('error', { 44 | message: err.message, 45 | error: err 46 | }); 47 | }); 48 | } 49 | 50 | // production error handler 51 | // no stacktraces leaked to user 52 | app.use(function (err, req, res, next) { 53 | res.status(err.status || 500); 54 | res.render('error', { 55 | message: err.message, 56 | error: {} 57 | }); 58 | }); 59 | 60 | 61 | module.exports = app; 62 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var debug = require('debug')('Chatroom'); 3 | var app = require('../app'); 4 | 5 | app.set('port', process.env.PORT || 3000); 6 | 7 | var server = app.listen(app.get('port'), function() { 8 | debug('Express server listening on port ' + server.address().port); 9 | }); 10 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Chatroom", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "description": "Chatroom", 9 | "author": { 10 | "name": "", 11 | "email": "" 12 | }, 13 | "dependencies": { 14 | "body-parser": "^1.8.4", 15 | "cookie-parser": "^1.4.1", 16 | "debug": "^2.2.0", 17 | "express": "^4.9.8", 18 | "jade": "^1.11.0", 19 | "morgan": "^1.6.1", 20 | "serve-favicon": "^2.1.7", 21 | "stylus": "^0.42.3" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/javascripts/index.js: -------------------------------------------------------------------------------- 1 | $('#send-message-btn').click(function () { 2 | var msg = $('#message-box').val(); 3 | $('#messages').append($('
').text(msg)); 4 | $('#message-box').val(''); 5 | return false; 6 | }); -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/javascripts/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/public/stylesheets/style.styl: -------------------------------------------------------------------------------- 1 | body 2 | padding: 50px 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif 4 | a 5 | color: #00B7FF 6 | 7 | html, body 8 | height: 100% 9 | 10 | .wrap 11 | min-height: 100% 12 | height: auto !important 13 | height: 100% 14 | margin: 0 auto -60px 15 | 16 | .push, .footer 17 | height: 60px 18 | 19 | .footer 20 | background-color: #f5f5f5 21 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function (req, res) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function (req, res) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .wrap 5 | .container-fluid 6 | h1 Welcome to the Node Chatroom 7 | #messages 8 | 9 | .push 10 | .footer 11 | .container-fluid 12 | .row 13 | .col-xs-8.col-sm-9 14 | input(type="text" id="message-box" class="form-control input-lg" placeholder="Write a message here..." rows="3") 15 | .col-xs-4.col-sm-3 16 | button#send-message-btn.btn.btn-primary.btn-lg.btn-block Send Message 17 | 18 | block body_end 19 | script(type='text/javascript' src='/javascripts/index.js') -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/End/Chatroom/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | meta(charset="utf-8") 6 | meta(http-equiv="X-UA-Compatible" content="IE=edge") 7 | link(rel='stylesheet' href='/stylesheets/bootstrap.min.css') 8 | link(rel='stylesheet' href='/stylesheets/bootstrap-theme.min.css') 9 | link(rel='stylesheet' href='/stylesheets/style.css') 10 | 11 | body 12 | block content 13 | 14 | script(type='text/javascript' src='/javascripts/jquery-2.2.0.min.js') 15 | script(type='text/javascript' src='/javascripts/bootstrap.min.js') 16 | 17 | block body_end -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Setup/nodecamp-creatingtheui-snippets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodecamp-creatingtheui-snippets", 3 | "displayName": "Node Camp - Creating the User Interface - Code Snippets", 4 | "description": "Code snippets for the 'Creating the User Interface' Node Camp demo", 5 | "version": "1.0.0", 6 | "publisher": "MicrosoftDX", 7 | "engines": { 8 | "vscode": "^0.10.1" 9 | }, 10 | "categories": [ 11 | "Snippets" 12 | ], 13 | "contributes": { 14 | "snippets": [ 15 | { 16 | "language": "jade", 17 | "path": "./snippets/snippets.json" 18 | } 19 | ] 20 | } 21 | } -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/Setup/nodecamp-creatingtheui-snippets/snippets/snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "Creating The UI Adding Bootstrap CSS": { 3 | "prefix": "CreatingTheUI-AddingBootstrapCSS", 4 | "body": [ 5 | "meta(charset=\"utf-8\")", 6 | "meta(http-equiv=\"X-UA-Compatible\" content=\"IE=edge\")", 7 | "link(rel='stylesheet' href='/stylesheets/bootstrap.min.css')", 8 | "link(rel='stylesheet' href='/stylesheets/bootstrap-theme.min.css')" 9 | ], 10 | "description": "Creating The UI Adding Bootstrap CSS" 11 | }, 12 | "Creating The UI Adding Bootstrap JS": { 13 | "prefix": "CreatingTheUI-AddingBootstrapJS", 14 | "body": [ 15 | "script(type='text/javascript' src='/javascripts/bootstrap.min.js')" 16 | ], 17 | "description": "Creating The UI Adding Bootstrap JS" 18 | }, 19 | "Creating The UI Create New Block": { 20 | "prefix": "CreatingTheUI-CreateNewBlock", 21 | "body": [ 22 | "block body_end" 23 | ], 24 | "description": "Creating The UI Create New Block" 25 | }, 26 | "Creating The UI Add Header": { 27 | "prefix": "CreatingTheUI-AddHeader", 28 | "body": [ 29 | ".wrap", 30 | "\t.container-fluid", 31 | "\t\th1 Welcome to the Node Chatroom", 32 | "\t\t#messages", 33 | "", 34 | "\t\t.push" 35 | ], 36 | "description": "Creating The UI Add Header" 37 | }, 38 | "Creating The UI Add Input And Button": { 39 | "prefix": "CreatingTheUI-AddInputAndButton", 40 | "body": [ 41 | ".footer", 42 | "\t.container-fluid", 43 | "\t\t.row", 44 | "\t\t\t.col-xs-8.col-sm-9", 45 | "\t\t\t\tinput(type=\"text\" id=\"message-box\" class=\"form-control input-lg\" placeholder=\"Write a message here...\" rows=\"3\")", 46 | "\t\t\t.col-xs-4.col-sm-3", 47 | "\t\t\t\tbutton#send-message-btn.btn.btn-primary.btn-lg.btn-block Send Message" 48 | ], 49 | "description": "Creating The UI Add Input And Button" 50 | }, 51 | "Creating The UI Add JS": { 52 | "prefix": "CreatingTheUI-AddJS", 53 | "body": [ 54 | "block body_end", 55 | "\tscript(type='text/javascript' src='/javascripts/index.js')" 56 | ], 57 | "description": "Creating The UI Add JS" 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/CreatingTheUI/source/assets/bootstrap.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/CreatingTheUI/source/assets/bootstrap.zip -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/images/bootstrap-components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/images/bootstrap-components.png -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/images/bootstrap-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/images/bootstrap-features.png -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/images/bootstrap-visual-studio-support.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/images/bootstrap-visual-studio-support.png -------------------------------------------------------------------------------- /Presentation/CreatingTheUI/images/get-bootstrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/CreatingTheUI/images/get-bootstrap.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress.pptx -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/contacts-route.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/contacts-route.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/creating-a-contactjs-route-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/creating-a-contactjs-route-file.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/creating-a-new-express-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/creating-a-new-express-app.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/launching-the-app-in-debug-mode-with-vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/launching-the-app-in-debug-mode-with-vscode.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/opening-the-app-js-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/opening-the-app-js-file.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-contacts-route.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-contacts-route.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-index-jade-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-index-jade-view.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-index-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-index-output.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-index-route-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-index-route-file.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-users-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-users-output.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-users-route-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCode/showing-the-users-route-file.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/contacts-route.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/contacts-route.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/creating-a-new-express-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/creating-a-new-express-app.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/creating-a-new-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/creating-a-new-item.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/creating-a-new-js-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/creating-a-new-js-file.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/opening-the-app-js-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/opening-the-app-js-file.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-contacts-route.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-contacts-route.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-index-jade-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-index-jade-view.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-index-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-index-output.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-index-route-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-index-route-file.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-users-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-users-output.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-users-route-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/images/VSCommunity/showing-the-users-route-file.png -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "ExpressApp", "ExpressApp\ExpressApp.njsproj", "{D48BA5B5-131F-4B51-BE1E-4B9D79F46912}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D48BA5B5-131F-4B51-BE1E-4B9D79F46912}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {D48BA5B5-131F-4B51-BE1E-4B9D79F46912}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {D48BA5B5-131F-4B51-BE1E-4B9D79F46912}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {D48BA5B5-131F-4B51-BE1E-4B9D79F46912}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/.gitignore: -------------------------------------------------------------------------------- 1 | /public/stylesheets/style.css 2 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/README.md: -------------------------------------------------------------------------------- 1 | # ExpressApp 2 | 3 | 4 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var favicon = require('serve-favicon'); 4 | var logger = require('morgan'); 5 | var cookieParser = require('cookie-parser'); 6 | var bodyParser = require('body-parser'); 7 | 8 | var routes = require('./routes/index'); 9 | var users = require('./routes/users'); 10 | var contacts = require('./routes/contacts'); 11 | 12 | var app = express(); 13 | 14 | // view engine setup 15 | app.set('views', path.join(__dirname, 'views')); 16 | app.set('view engine', 'jade'); 17 | 18 | // uncomment after placing your favicon in /public 19 | //app.use(favicon(__dirname + '/public/favicon.ico')); 20 | app.use(logger('dev')); 21 | app.use(bodyParser.json()); 22 | app.use(bodyParser.urlencoded({ extended: false })); 23 | app.use(cookieParser()); 24 | app.use(require('stylus').middleware(path.join(__dirname, 'public'))); 25 | app.use(express.static(path.join(__dirname, 'public'))); 26 | 27 | app.use('/', routes); 28 | app.use('/users', users); 29 | app.use('/contacts', contacts); 30 | 31 | // catch 404 and forward to error handler 32 | app.use(function (req, res, next) { 33 | var err = new Error('Not Found'); 34 | err.status = 404; 35 | next(err); 36 | }); 37 | 38 | // error handlers 39 | 40 | // development error handler 41 | // will print stacktrace 42 | if (app.get('env') === 'development') { 43 | app.use(function (err, req, res, next) { 44 | res.status(err.status || 500); 45 | res.render('error', { 46 | message: err.message, 47 | error: err 48 | }); 49 | }); 50 | } 51 | 52 | // production error handler 53 | // no stacktraces leaked to user 54 | app.use(function (err, req, res, next) { 55 | res.status(err.status || 500); 56 | res.render('error', { 57 | message: err.message, 58 | error: {} 59 | }); 60 | }); 61 | 62 | 63 | module.exports = app; 64 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var debug = require('debug')('ExpressApp'); 3 | var app = require('../app'); 4 | 5 | app.set('port', process.env.PORT || 3000); 6 | 7 | var server = app.listen(app.get('port'), function() { 8 | debug('Express server listening on port ' + server.address().port); 9 | }); 10 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ExpressApp", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "description": "ExpressApp", 9 | "author": { 10 | "name": "", 11 | "email": "" 12 | }, 13 | "dependencies": { 14 | "express": "~4.14.0", 15 | "body-parser": "~1.15.2", 16 | "cookie-parser": "~1.4.3", 17 | "morgan": "~1.7.0", 18 | "serve-favicon": "~2.3.0", 19 | "debug": "~2.2.0", 20 | "jade": "~1.11.0", 21 | "stylus": "0.54.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/public/stylesheets/style.styl: -------------------------------------------------------------------------------- 1 | body 2 | padding: 50px 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif 4 | a 5 | color: #00B7FF -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/routes/contacts.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET contacts */ 5 | router.get('/', function (req, res) { 6 | var contacts = [{ "name": "Jane Doe", "phone": "888-555-1212" }, { "name": "Justin Doe", "phone": "877-123-1212" }]; 7 | res.json(contacts); 8 | }); 9 | 10 | module.exports = router; 11 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function (req, res) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function (req, res) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/End/ExpressApp/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/Setup.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | CD /d "%~dp0" 4 | 5 | ::Test If script has Admin Priviledges/is elevated 6 | REG QUERY "HKU\S-1-5-19" 7 | IF %ERRORLEVEL% NEQ 0 ( 8 | ECHO Please run this script as an administrator 9 | pause 10 | EXIT /B 1 11 | ) 12 | cls 13 | echo Setup Options 14 | echo ============= 15 | echo. 16 | echo 1. Execute setup scripts. 17 | echo WARNING: The setup could fail and the Demo might not work properly if you don't have all the prerequisites installed. 18 | echo. 19 | echo 2. Exit. 20 | echo. 21 | choice /c:12 /M "Choose an option: " 22 | if errorlevel 2 goto exit 23 | if errorlevel 1 goto execsetup 24 | 25 | 26 | :execsetup 27 | REM Here executes the Setup.cmd only. 28 | echo Executing setup scripts. 29 | call .\Setup\Setup.cmd 30 | goto exit 31 | 32 | :pause 33 | pause 34 | 35 | :exit 36 | 37 | 38 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/Setup/Cleanup.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo. 3 | echo ====================================================== 4 | echo Uninstall Visual Studio Code Snippets for the demo 5 | echo ====================================================== 6 | echo. 7 | 8 | for /f "tokens=2,*" %%a in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal" 2^>NUL ^| findstr Personal') do set MyDocuments=%%b 9 | 10 | DEL "%MyDocuments%\Visual Studio 2015\Code Snippets\JavaScript\My Code Snippets\IntroductionToExpress*.snippet" 2>NUL 11 | 12 | echo Demo Code Snippets have been removed! 13 | PAUSE -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/Setup/Setup.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | %~d0 3 | 4 | CD "%~dp0" 5 | ECHO Install Visual Studio 2015 Code Snippets for the demo: 6 | ECHO ------------------------------------------------------------------------------- 7 | CALL .\Scripts\InstallCodeSnippets.cmd 8 | ECHO Done! 9 | ECHO. 10 | ECHO ******************************************************************************* 11 | ECHO. 12 | 13 | @PAUSE 14 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/Setup/nodecamp-introtoexpress-snippets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodecamp-introtoexpress-snippets", 3 | "displayName": "Node Camp - Introduction to Express Framework - Code Snippets", 4 | "description": "Code snippets for the 'Introduction to Express Framework' Node Camp demo", 5 | "version": "1.0.0", 6 | "publisher": "MicrosoftDX", 7 | "engines": { 8 | "vscode": "^0.10.1" 9 | }, 10 | "categories": [ 11 | "Snippets" 12 | ], 13 | "contributes": { 14 | "snippets": [ 15 | { 16 | "language": "javascript", 17 | "path": "./snippets/snippets.json" 18 | } 19 | ] 20 | } 21 | } -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/Setup/nodecamp-introtoexpress-snippets/snippets/snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "Introduction To Express Contacts Route": { 3 | "prefix": "IntroductionToExpress-Contacts-route", 4 | "body": [ 5 | "var express = require('express');", 6 | "", 7 | "var router = express.Router();", 8 | "", 9 | "/* GET contacts. */", 10 | "router.get('/', function (req, res) {", 11 | "\tvar contacts = [{ \"name\": \"Jane Doe\", \"phone\": \"888-555-1212\" }, { \"name\": \"Justin Doe\", \"phone\": \"877-123-1212\" }];", 12 | "\tres.json(contacts);", 13 | "});", 14 | "", 15 | "module.exports = router;" 16 | ], 17 | "description": "Introduction To Express Contacts Route" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/Setup/scripts/InstallCodeSnippets.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | %~d0 3 | cd "%~dp0" 4 | 5 | echo. 6 | echo ================================================ 7 | echo Install Visual Studio Code Snippets for the demo 8 | echo ================================================ 9 | echo. 10 | 11 | IF EXIST %WINDIR%\SysWow64 ( 12 | set powerShellDir=%WINDIR%\SysWow64\windowspowershell\v1.0 13 | ) ELSE ( 14 | set powerShellDir=%WINDIR%\system32\windowspowershell\v1.0 15 | ) 16 | 17 | call %powerShellDir%\powershell.exe -Command Set-ExecutionPolicy unrestricted 18 | 19 | call %powerShellDir%\powershell.exe -Command "&'.\installCodeSnippets.ps1' '%~dp0snippets\IntroductionToExpress.vsi'" 20 | 21 | -------------------------------------------------------------------------------- /Presentation/IntroToExpress/IntroToExpress/source/Setup/scripts/snippets/IntroductionToExpress.vsi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToExpress/IntroToExpress/source/Setup/scripts/snippets/IntroductionToExpress.vsi -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS.pptx -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/creating-a-clientjs-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/creating-a-clientjs-file.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/creating-a-new-working-directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/creating-a-new-working-directory.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/creating-a-serverjs-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/creating-a-serverjs-file.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/creating-the-app-js-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/creating-the-app-js-file.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/initializing-a-nodejs-application-with-packagejson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/initializing-a-nodejs-application-with-packagejson.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/installing-express-dependency-using-npm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/installing-express-dependency-using-npm.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/navigating-to-the-http-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/navigating-to-the-http-server.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/reading-a-file-asynchronously.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/reading-a-file-asynchronously.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/reading-a-file-synchronously.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/reading-a-file-synchronously.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/running-the-console-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/running-the-console-app.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/running-the-http-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/running-the-http-server.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/running-the-tcp-client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/running-the-tcp-client.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/running-the-tcp-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/running-the-tcp-server.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/showing-the-installed-dependency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCode/showing-the-installed-dependency.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/creating-a-new-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/creating-a-new-item.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/creating-a-new-js-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/creating-a-new-js-file.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/creating-a-new-nodejs-application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/creating-a-new-nodejs-application.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/installing-express-dependency-using-npm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/installing-express-dependency-using-npm.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/installing-npm-packages-with-vs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/installing-npm-packages-with-vs.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/navigating-to-the-http-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/navigating-to-the-http-server.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/opening-the-app-js-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/opening-the-app-js-file.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/opening-the-command-prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/opening-the-command-prompt.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/reading-a-file-asynchronously.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/reading-a-file-asynchronously.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/reading-a-file-synchronously.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/reading-a-file-synchronously.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/running-the-console-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/running-the-console-app.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/running-the-http-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/running-the-http-server.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/running-the-tcp-client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/running-the-tcp-client.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/running-the-tcp-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/running-the-tcp-server.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/searching-for-express-package-in-vs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/searching-for-express-package-in-vs.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/showing-the-installed-dependency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/images/VSCommunity/showing-the-installed-dependency.png -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/End/NodejsConsoleApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "NodejsConsoleApp", "NodejsConsoleApp\NodejsConsoleApp.njsproj", "{4256BFB7-367B-4F07-90FA-4A913982F39B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {4256BFB7-367B-4F07-90FA-4A913982F39B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {4256BFB7-367B-4F07-90FA-4A913982F39B}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {4256BFB7-367B-4F07-90FA-4A913982F39B}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {4256BFB7-367B-4F07-90FA-4A913982F39B}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/End/NodejsConsoleApp/README.md: -------------------------------------------------------------------------------- 1 | # NodejsConsoleApp 2 | 3 | 4 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/End/NodejsConsoleApp/app.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | 3 | var server = http.createServer(function (request, response) { 4 | response.writeHead(200, { "Content-Type": "text/plain" }); 5 | response.end("Hello World\n"); 6 | }); 7 | 8 | server.listen(7000); 9 | 10 | console.log('Navigate to http://localhost:7000'); 11 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/End/NodejsConsoleApp/client.js: -------------------------------------------------------------------------------- 1 | var net = require('net'); 2 | 3 | var client = new net.Socket(); 4 | 5 | client.connect(7000, "127.0.0.1"); 6 | 7 | client.on('data', function (data) { 8 | console.log('Data: ' + data); 9 | client.destroy(); 10 | }); 11 | 12 | // Add a 'close' event handler for the client socket 13 | client.on('close', function () { 14 | console.log('Connection closed'); 15 | }); 16 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/End/NodejsConsoleApp/file-reader-async.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | 3 | fs.readFile('package.json', function (err, buf) { 4 | console.log(buf.toString()); 5 | }); 6 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/End/NodejsConsoleApp/file-reader-sync.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | 3 | var contents = fs.readFileSync('package.json').toString(); 4 | console.log(contents); 5 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/End/NodejsConsoleApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NodejsConsoleApp", 3 | "version": "0.0.0", 4 | "description": "NodejsConsoleApp", 5 | "main": "app.js", 6 | "author": { 7 | "name": "User", 8 | "email": "" 9 | }, 10 | "dependencies": { 11 | "express": "^4.13.3" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/End/NodejsConsoleApp/server.js: -------------------------------------------------------------------------------- 1 | var net = require('net'); 2 | 3 | // The handler argument is automatically set as a listener for the 'connection' event 4 | var server = net.createServer(function (socket) { 5 | console.log("Connection from " + socket.remoteAddress); 6 | socket.end("Hello World\n"); 7 | }); 8 | 9 | server.listen(7000, "127.0.0.1"); 10 | 11 | console.log('TCP server running at 127.0.0.1:7000'); 12 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/Setup.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | CD /d "%~dp0" 4 | 5 | ::Test If script has Admin Priviledges/is elevated 6 | REG QUERY "HKU\S-1-5-19" 7 | IF %ERRORLEVEL% NEQ 0 ( 8 | ECHO Please run this script as an administrator 9 | pause 10 | EXIT /B 1 11 | ) 12 | cls 13 | echo Setup Options 14 | echo ============= 15 | echo. 16 | echo 1. Execute setup scripts. 17 | echo WARNING: The setup could fail and the Demo might not work properly if you don't have all the prerequisites installed. 18 | echo. 19 | echo 2. Exit. 20 | echo. 21 | choice /c:12 /M "Choose an option: " 22 | if errorlevel 2 goto exit 23 | if errorlevel 1 goto execsetup 24 | 25 | 26 | :execsetup 27 | REM Here executes the Setup.cmd only. 28 | echo Executing setup scripts. 29 | call .\Setup\Setup.cmd 30 | goto exit 31 | 32 | :pause 33 | pause 34 | 35 | :exit 36 | 37 | 38 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/Setup/Cleanup.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo. 3 | echo ====================================================== 4 | echo Uninstall Visual Studio Code Snippets for the demo 5 | echo ====================================================== 6 | echo. 7 | 8 | for /f "tokens=2,*" %%a in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal" 2^>NUL ^| findstr Personal') do set MyDocuments=%%b 9 | 10 | DEL "%MyDocuments%\Visual Studio 2015\Code Snippets\JavaScript\My Code Snippets\NodeJsIntroduction*.snippet" 2>NUL 11 | 12 | echo Demo Code Snippets have been removed! 13 | PAUSE 14 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/Setup/Setup.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | %~d0 3 | 4 | CD "%~dp0" 5 | ECHO Install Visual Studio 2015 Code Snippets for the demo: 6 | ECHO ------------------------------------------------------------------------------- 7 | CALL .\Scripts\InstallCodeSnippets.cmd 8 | ECHO Done! 9 | ECHO. 10 | ECHO ******************************************************************************* 11 | ECHO. 12 | 13 | @PAUSE 14 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/Setup/nodecamp-introtonodejs-snippets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodecamp-introtonodejs-snippets", 3 | "displayName": "Node Camp - Introduction to Node.js Demo - Code Snippets", 4 | "description": "Code snippets for the 'Introduction to Node.js' Node Camp demo", 5 | "version": "1.0.0", 6 | "publisher": "MicrosoftDX", 7 | "engines": { 8 | "vscode": "^0.10.1" 9 | }, 10 | "categories": [ 11 | "Snippets" 12 | ], 13 | "contributes": { 14 | "snippets": [ 15 | { 16 | "language": "javascript", 17 | "path": "./snippets/snippets.json" 18 | } 19 | ] 20 | } 21 | } -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/Setup/scripts/InstallCodeSnippets.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | %~d0 3 | cd "%~dp0" 4 | 5 | echo. 6 | echo ================================================ 7 | echo Install Visual Studio Code Snippets for the demo 8 | echo ================================================ 9 | echo. 10 | 11 | IF EXIST %WINDIR%\SysWow64 ( 12 | set powerShellDir=%WINDIR%\SysWow64\windowspowershell\v1.0 13 | ) ELSE ( 14 | set powerShellDir=%WINDIR%\system32\windowspowershell\v1.0 15 | ) 16 | 17 | call %powerShellDir%\powershell.exe -Command Set-ExecutionPolicy unrestricted 18 | 19 | call %powerShellDir%\powershell.exe -Command "&'.\installCodeSnippets.ps1' '%~dp0snippets\NodeJsIntroduction.vsi'" 20 | -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/IntroToNodeJS/source/Setup/scripts/snippets/NodeJsIntroduction.vsi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/IntroToNodeJS/source/Setup/scripts/snippets/NodeJsIntroduction.vsi -------------------------------------------------------------------------------- /Presentation/IntroToNodeJS/images/callback-insanity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/Presentation/IntroToNodeJS/images/callback-insanity.png -------------------------------------------------------------------------------- /_layouts/MicrosoftLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microsoft-Web/NodeCamp/585788deb9f1f5854829d56bdb0f99dcdd974ce4/_layouts/MicrosoftLogo.png -------------------------------------------------------------------------------- /_layouts/custom.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: rgb(1,113,176); 3 | background-color: rgb(1,113,176); 4 | } 5 | 6 | /********************************************* 7 | * NAVIGATION CONTROLS 8 | *********************************************/ 9 | .reveal .controls .navigate-left, 10 | .reveal .controls .navigate-left.enabled { 11 | border-right-color: #e7ad52; } 12 | 13 | .reveal .controls .navigate-right, 14 | .reveal .controls .navigate-right.enabled { 15 | border-left-color: #e7ad52; } 16 | 17 | .reveal .controls .navigate-up, 18 | .reveal .controls .navigate-up.enabled { 19 | border-bottom-color: #e7ad52; } 20 | 21 | .reveal .controls .navigate-down, 22 | .reveal .controls .navigate-down.enabled { 23 | border-top-color: #e7ad52; } 24 | 25 | .reveal .controls .navigate-left.enabled:hover { 26 | border-right-color: #f3d7ac; } 27 | 28 | .reveal .controls .navigate-right.enabled:hover { 29 | border-left-color: #f3d7ac; } 30 | 31 | .reveal .controls .navigate-up.enabled:hover { 32 | border-bottom-color: #f3d7ac; } 33 | 34 | .reveal .controls .navigate-down.enabled:hover { 35 | border-top-color: #f3d7ac; } 36 | 37 | 38 | .reveal section img { 39 | border: none; 40 | background: none; 41 | box-shadow: none; 42 | } 43 | 44 | 45 | html.agenda body { 46 | background: rgb(29,67,128); 47 | background-color: rgb(29,67,128); 48 | } 49 | 50 | html.title body { 51 | background-color: rgb(40,159,215); 52 | background: rgb(40,159,215); 53 | } 54 | 55 | html.demo body { 56 | background: rgb(60,69,79); 57 | background-color: rgb(60,69,79); 58 | } 59 | 60 | html.the-end body { 61 | background: black; 62 | background-color: black; 63 | } -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |