This was presented at South Florida Code Camp 2016.
You can find the code from the demo here: https://github.com/joescars/SFCCASPCoreDemo
In this presentation I walk you through how to get started with ASP.NET Core 1.0. We focus on the cloud and cross platform story.
I walk you through the following:
- High level overview of ASP.NET Core
- How to install ASP.NET Core
- Creating an ASP.NET Core project in Visual Studio
- Project structure and overview
- Local debugging and building
- Pushing the website to Azure using local Git repository
We then switch over to the MAC and continue with the following
- How to install and configure ASP.NET core and Visual Studio Code on the MAC
- Pulling the project down to MAC via Git
- Editing the project in Visual Studio Code
- Building the project and running locally using Kestrel Web server
- Pushing the updates back up to Azure using Git
This video will walk you through how to deploy Vorlon.JS to an Azure Web App using Git version control. The pre-requisites for this video are that you have an active Microsoft Azure account and node.js installed.
- Create new web app using custom create
- From the configure section, Turn on Web Sockets – Save
- Go Back to Dashboard
- Setup deployment from source control
- Select Local Git Repository
- This will create the Git repository
- Install VorlonJS on your machine
- nodejs must be installed already. If not, install from nodejs.org
- Open node.js command prompt
- Enter the following: npm i –g vorlon
- Test Vorlon
- Type the following: vorlon
- To terminate: Terminate – ctrl + c
- You should be in your user folder. We must now browse to the proper folder
- cd appdata
- cd roaming
- cd npm
- cd node_modules
- cd vorlon
- Type: start . (this will launch explorer)
- Open another explorer
- Create a new folder (ex C:\Dev\VorlonJS)
- Copy node_modules folder from vorlon folder to the new folder
- Copy all the files WITHIN the server folder (within vorlon folder) to the new folder you created
- Create new text file package.json
- Edit the file and add the following
Now we want to commit this into azure website
- Open Git Bash
- Get GIT url from Azure Deployments page
- It also has instructions
- Browse to your vorlonjs folder you created (example: cd /c/dev/vorlonjs)
- Now we are going to use the commands from azure to add files to git
- git init
- git add .
- git commit –m “initial commit”
- Again copying right from azure to add remote repository and commit
- git remote add azure (this line will be in your azure account)
- git push azure master
- If need be use reset deployment credentials
- Enter your password
- When it’s done it should now say “Active Deployment”
- Go to dashboard / URL
- First time it loads it may error out, just refresh it
- That’s it!
Some of the most common questions I get from new developers is “How do I get started?” and “Are there free resources online for me to learn?“. The good news is that it is very easy to get started and Microsoft Virtual Academy is a phenomenal free resource online with hundreds of courses.
If you are just getting into web development I highly recommend visiting Web Development Courses and Beginner Courses to browse all the free courses Microsoft Virtual Academy has to offer. Simply register on the site to get complete access to the videos, course materials and example code.
There are many to choose from and they guide you from basic HTML to launching Web Apps using Microsoft Azure. Head on over and happy learning!