Move Existing NodeJS Site To Windows Azure Websites

image.png

Background Mr Glen Block (formerly of Microsoft) has really good video he did while at the Sencha Conference in 2013 in Orlando on how to work with NodeJS as an Azure Web Site.  Azure Websites are a great way to easily spin up low cost web sites that can scale in a big way.  I will not go into all the details of the setup but will fork part of his discussion on how to take an existing azure web site and push it to node.  There are a couple interesting differences in my discussion that are particularly useful.   The value add here is I’m assuming you already have a Git repository For your node project that does not have the root as the NodeJS directory.  That is, in Glen’s talk he assume you are starting a node project from … Continue Reading

Commands (CLI) to remember for Azure, NodeJS and MongoDb

Having just started using Azure Web Sites with NodeJS and MongoDB I thought I’d blog several of the commands I use often (mostly for me to go back to).  Here is my short list NodeJS node server.js – starts node node –debug server.js – starts node and enables debugging (needs npm install –g node-inspector) npm install – installs all node packages in project MongoDb mongod – starts mongo daemon mongostat – shows stats while mongodb running mongotop – shows top mongo processes Windows Azure CLI npm install azure – so you can use azure command line (cli) npm install azure-cli –g azure site create mywebsite azure site list azure site start mywebsite azure site delete mywebsite azure site log … Continue Reading

Safely Encoding Strings On ASP.NET MVC Razor Pages (sometimes)

  Background Sometimes, we want to let html tags come through our web pages from user defined content.  If for example, you have a workflow that requires approval before publishing, there are times when you want to let the author put through html, links, etc.  Solution In Visual Studio write a simple HtmlHelper method that allows for a flag you can pass through.  In my case, I have a database table with a boolean column “allowhtml”.  If this is set, then instead of using Html.Raw(…) I can use my own helper method, pass in the allowHtml value and if it is set true, then allow the not encoded Html to flow through. Here is that helper method: namespace WebAPI.Code.Helpers { public static class … Continue Reading

Awesome Announcement Regarding Code Stars Summit (2 weeks from now)

As most readers of my blog know, I organizer both Silicon Valley Code Camp (going on our 9th year now with dates set for 10/11-12/2014 again at Foothill College in Los Altos) and Code Stars Summit which is happening for the first time this year in San Francisco.   Code Stars Summit is a much smaller event (under 100 people) is a paid event with top quality workshop leaders doing all day training events.   Yesterday, we added the benefit that all attendees will get a 1 year subscription to Frontend Masters.  See the announcement below for details. Breaking News: All attendees of Code Stars Summit will receive a free 1 year subscription to FrontEnd Masters catalog of online courses ($390 value).  FrontEnd Masters has courses in … Continue Reading

Follow

Get every new post delivered to your Inbox

Join other followers: