Module P3 Practical: Building a webapp in nodejs and

Slides:



Advertisements
Similar presentations
Client-server practices DSC340 Mike Pangburn. Agenda Overview of client-server development Editing on client (e.g., Notepad) or directly on server (e.g.,
Advertisements

beas WEB App Installation
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
CSC 450/550 Part 6: The Application Layer Example: The World Wide Web.
Advanced Java Class Web Applications – Part 0 (Introduction)
Lesson 20 – OTHER WINDOWS 2000 SERVER SERVICES. DHCP server DNS RAS and RRAS Internet Information Server Cluster services Windows terminal services OVERVIEW.
Website Development with PHP and MySQL Introduction.
Lesson 2: Configuring Servers
INTRO TO MAKING A WEBSITE Mark Zhang.  HTML  CSS  Javascript  PHP  MySQL  …That’s a lot of stuff!
Quick Tour of the Web Technologies: The BIG picture LECTURE A bird’s eye view of the different web technologies that we shall explore and study.
Remote Accessing Your Home Computer Using VNC and a Dynamic DNS Name.
16.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 16: Examining Software Update.
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
IT 210 The Internet & World Wide Web introduction.
Chapter 1: Introduction to Web
Apache + Tomcat. Apache + Tomcat Download mod_webapp.so:
COMP 321 Week 7. Overview HTML and HTTP Basics Dynamic Web Content ServletsMVC Tomcat in Eclipse Demonstration Lab 7-1 Introduction.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
Client – Server Application Can you create a client server application: The server will be running as a service: does not have a GUI The server will run.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
Topic Java EE installation (Eclipse, glassfish, etc.) Eclipse configuration for EE Creating a Java Web Dynamic Project Creating your first servlet.
Web Architecture Introduction
RUBRIC IP1 Ruben Botero Web Design III. The different approaches to accessing data in a database through client-side scripting languages. – On the client.
The Module Road Map Assignment 1 Road Map We will look at… Internet / World Wide Web Aspects of their operation The role of clients and servers ASPX.
IPT – Getting Started June Online Resources Project Website Requirements Server Preparation Installation Running IPT Installation Demo Upgrade/Reinstall.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Esri UC 2014 | Demo Theater | Using ArcGIS Online App Logins in Node.js James Tedrick.
Welcome to Snap! Below the Line Decal Facilitated By: Zachary McPherson and Bao Xie.
How Web Servers and The Internet Work The Basic Process.
Web Cache. What is Cache? Cache is the storing of data temporarily to improve performance. Cache exist in a variety of areas such as your CPU, Hard Disk.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
Google App Engine using Java 1. Outline Getting started Guestbook example Todo example Simplified Madlib 2.
1 E-Site - FTP Services Setup / install guide. 2 About FTP services can run on any desired port(s) Runs as a windows service Works for all sites installed.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Presented by Michael Rainey South Mississippi Linux Users Group
NodeJS and MEAN cs6320.
Module 3: Enabling Access to Internet Resources
Open OnDemand: Open Source General Purpose HPC Portal
Physics validation database
beas WEB App Installation
Web Development Web Servers.
Node.js Express Web Applications
Ad-blocker circumvention System
Why API?.
Data Virtualization Tutorial… CORS and CIS
Getting Started with R.
Web Hosting with OpenShift
Node.js Express Web Services
NodeJS and MEAN Prof. L. Grewe.
Logo here Module 3 Microsoft Azure Web App. Logo here Module Overview Introduction to App Service Overview of Web Apps Hosting Web Applications in Azure.
Web Caching? Web Caching:.
Build Better Apps with MEAN.
Module 3 Building a web app.
Node.Js Server Side Javascript
Dynamic DNS support for EGI Federated cloud
CS222 Web Programming Course Outline
MVC Framework, in general.
COMP 101 Introduction.
04 | Web Applications Gerry O’Brien | Technical Content Development Manager Paul Pardi | Senior Content Publishing Manager.
Hybrid Search Planning Implementation.
COMP 101 Introduction.
Lecture 1: Multi-tier Architecture Overview
Configuring Internet-related services
The Client Server Model
Setting up your dev environment
The Client Server Model
Lecture 12: The Fetch Api and AJAx
Client-Server Model: Requesting a Web Page
Lab 1: D3 Setup John Fallon
Presentation transcript:

Module P3 Practical: Building a webapp in nodejs and using git for source code management Bonus: Introduction to a reverse proxy!

Contents Objective: Create a project and deploy a webapp via the imad.hasura.io console Understand how the console works Understand reverse proxies Develop and run the webapp locally Topics: Overview of how to use the imad console Understanding the console git and github.com Local development and git usage

https://imad.hasura.io demo Log in Create project Go to coding console Click on restart Wait for the app to come online (might take some time. If you’re waiting for more than 10mins reach out to us on @tanmaigo / @IMAD_mooc and I’ll get our team to help you out!) Make changes Look at logs

How does the imad.hasura.io work? Remember our 5 step process? Get a domain name We got the domain name imad.hasura-app.io We create a subdomain for each student as <username>.imad.hasura-app.io Get a server machine and a static IP We have a machine (actually a huge cluster of machines!) that is fronted by an IP Map the domain name to our IP We map *.imad.hasura-app.io to our IP Develop the webapp. Write/install a webserver. We wrote some source code that was copied to your “github” account when you clicked on “create project’ Deploy the webapp When you click on “Apply changes & restart” we take your files from the browser, copy them to the server machines (from point 2) and start your webserver

But how do multiple domains work on the same IP? There are 2 options: We all share the same IP, but we all use different ports Like Module P1 But then: User1’s app: imad.hasura-app.io:8080 User2’s app: imad.hasura-app.io:8081 We want good looking URLs! We use a reverse proxy Big server machine server1 server2 ... server1000 server1001

nginx (reverse-proxy) A reverse proxy! process1: 8085 process2: 8086 process3: 8087 process3: 8088 user2.imad.hasura-app.io user3.imad.hasura-app.io user1.imad.hasura-app.io user4.imad.hasura-app.io user4.imad.hasura-app.io nginx (reverse-proxy) Running on port 80 Server machine *.imad.hasura-app.io

A reverse proxy! What does a web reverse proxy do? It is a web server that fronts other web servers Based on some parameters it chooses to route the incoming connection to a different upstream web server Based on any property of the request Based on the hostname Based on a URL Based on an HTTP method, or HTTP header Based on something else Arbitrary or round-robin routing (typically used for load balancing) Commonly used reverse proxies: nginx HAProxy

Full demo without console + local development After clicking on create project Go to github Get git clone URL, clone repo npm install & node server.js Go to localhost:8080 Finish your work, git push Now go back to your coding console, apply changes and restart Go to app Everything works! Why git? Why not just copy files? Like FTP. Understand Git and Version Control by reading http://blog.scottlowe.org/2015/01/14/non-programmer-git-intro/

Copy of source code on my computer IMAD team basic-webapp Deployed basic-webapp URL for the project’s source code files (https://github.com/username/imad-2016-app) Server (machine) (https://github.com/username/imad-2016-app) My copy basic-webapp Copy of source code on my computer

Student tasks Make a profile page Post screenshots of your running app on the forum on the introduction thread! Try to get the local development environment running Read up on HTML & CSS and make a cool looking profile page Take a few relevant exercises/lessons to learn HTML/CSS basics: https://www.codecademy.com/learn/web

Important notes You don’t need to have a local setup No terminal, or git required But recommended! Use the console for development and deployment You can write your code on the console directly, you don’t need a local setup You can deploy your code too Because of extremely high load, your server will switch off if inactive for more than 10mins, you can just restart it from the console again! Reach out to us on the forum or on twitter @IMAD_mooc @tanmaigo in case you have any urgent issues (like something not working on the IMAD console) and we’ll help you out

Coming up... Server side Javascript Creating more HTML pages and understand templating Introduction to client side Javascript Write our own API