8000 GitHub - bowdenk7/lab1-spa
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bowdenk7/lab1-spa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lab 1 - Singe Page App Hosting on Azure Storage

This lab will walk you through hosting a front-end JavaScript app with Azure Storage. This is a cheap and fast way to host self contained, front end assets like React/Angular/Vue apps.

Checkout and build the React Single Page App (SPA)

  1. Open the integrated terminal in VS Code with ctrl + tilde
  2. Clone and open the code in this repository with VS Code.
cd ~/Downloads
git clone https://github.com/bowdenk7/lab1-spa.git
cd lab1-spa ; code . -r
  1. Run npm install to get the dependencies
  2. Run npm run build to build locally
  3. Run locally with npm run start
  4. You should see the following:

image

Your First Deployment

  1. Open the Azure tab on the left side of VS Code

  2. Open the storage section

  3. Open the demo subscription: CADDAI Backups

image

  1. Right click the storage account that corresponds to your machine number (ie. jsinteractive) and choose Deploy to static website.

  2. A warning will popup that says "The storage container "jsinteractive4/$web" contains 15 files. Deploying will delete all of these existing files. Continue?" Choose Delete and deploy

  3. Choose browse and select the build folder. This contains the React SPA you just built locally.

image

  1. When deployment completes, you'll see a notification in the bottom right. Click Browse to Website

Make a code change

  1. Back in VS Code, open src/App.js and make a change. If you're unfamiliar with React, that's ok, find line 12 and edit the text.

image

  1. Rebuild with npm run build

  2. Redeploy following the same steps in the above section

Summary

This lab shows you how quickly and easily you can deploy a front-end app to Azure Storage using VS Code and the Azure Storage extension. These tools allow for rapid iteration and deployment.

All Done!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0