Angular 2: Application Settings using the CLI Environment Option

Application wide settings can be a long conversation when starting a new application. Here are just a few questions when some of my teams started this conversation: Do we use ENV variables? What about manual bootstrap? Configuration files? Should we get them from the server? Using angular-cli & environment.ts The new angular-cli have the concept of different environments like development (dev) and production (prod). When creating a new application with the cli ng my-app and /environments folder is a part of the scaffold which contains the environment files. . ├── environment.ts ├── environment.prod.ts . . and then within the /src/app folder is and environment.ts file. Here are the contents: export const environment = { production: false }; As you might imagine, the...


Exploring the new dotnet cli

Note: At the time of this post, the dotnet cli version being used 1.0.0-rc4-004771 available from GitHub dotnet/cli repo - https://github.com/dotnet/core/blob/master/release-notes/rc4-download.md I have been a long time fan of the yeoman generator for ASP.NET Core and still I would argue that it's still the most complete project creation utility for cross platform development. With that said, the dotnet cli has really raised the bar for command line parity development tooling when comparing similar capabilities from other languages or frameworks where CLI is the first tool. Historically, as you know, Visual Studio is the standard for "File->New Project" or anything to do with a .NET solution or...


Troubleshooting Installing .NET Core 1.1 RTM on OSX

.NET Core 1.1 RTM was announced yesterday along with Visual Studio for Mac! So of course, I jumped right over to install them both. During the install of the 1.1 version of .NET Core from the downloads page, hit a snag on OSX. If you have seen recent Scott Hanselman talk ASP.NET Core, there is a slide he uses where he references "How do you like your ASP.NET?" I'm somewhere between "medium-rare" and "medium-well", depends on the machine I am using. I had the preview bits installed which had a version of 1.0.0-preview2.1-003155 and now the RC 1.1 is released with version of 1.0.0-preview2-1-003177. When running the command dotnet --info...


Configure Docker for Windows under Parallels

I use OSX as my primary development machine but still at time run to Visual Studio for work stuff, new features I'm testing etc. The most recent reason is Visual Studio '15 Preview and the new Docker features that are quite awesome. I didn't want to fire up the ThinkPad, connect it to the big monitor etc; so it was time to get Docker working on Parallels. Come to find out it was a few simple configurations. Check the "Enable nested virtualization" option under Hardware / CPU & Memory - Advanced Settings of your Windows 10 VM. Another setting I might suggest is setting the Memory somewhere between 4 - 8 GB of RAM or Docker may not start. Shared Drives...


Using Apache Web Server as a reverse-proxy for ASP.NET Core

Apache is a very popular HTTP server and can be configured as a proxy to redirect HTTP traffic similar to nginx. In this guide, we will learn how to set up Apache on CentOS 7 and use it as a reverse-proxy to welcome incoming connections and redirect them to the ASP.NET Core application running on Kestrel. For this purpose, we will use the mod_proxy extension and other related Apache modules. Prerequisites A server running CentOS 7, with a standard user account with sudo privilege. An existing ASP.NET Core application. Publish your application Run dotnet publish -c Release from your development environment to package your application into a self-contained directory that can run on your server. The published...