Presentation is loading. Please wait.

Presentation is loading. Please wait.

02 | Introduction to Express Framework Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist.

Similar presentations


Presentation on theme: "02 | Introduction to Express Framework Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist."— Presentation transcript:

1 02 | Introduction to Express Framework Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist

2 What is Express Installing & Using Express Demo: Creating a simple Rest API Templating Module Overview

3 02 | What is Express Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist

4 What is Express? Express is a minimal, open source and flexible node.js web app framework designed to make developing websites, web apps and APIs much easier.

5 Why use Express? Express helps you respond to requests with route support so that you may write responses to specific URLs. Supports multiple templating engines to simplify generating HTML.

6 02 | Installing and Using Express Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist

7 Installing and Using Express npm install express npm install jade

8 02 | Creating a Simple Rest API Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist

9 Explanation of Routes A router maps HTTP requests to a callback. HTTP requests can be sent as GET/POST/PUT/DELETE, etc. URLs describe the location targeted. Node helps you map a HTTP GET request like: –http://localhost:8888/index To a request handler (callback) app.get('/index', function (req, res) {});

10 Creating a Simple Express Application var express = require('express'); var app = express(); app.get('/', function (req, res) { res.json({message:'hooray! welcome to our api! '}); }); app.listen(process.env.PORT || 8080);

11 DEMO Creating a simple Rest API with Express Framework

12 Why use Express?

13

14

15

16

17

18

19 Resources Express Framework http://expressjs.com/http://expressjs.com/ Intro to Express http://code.tutsplus.com/tutorials/introduction-to-express-- net-33367 http://code.tutsplus.com/tutorials/introduction-to-express-- net-33367 Jade Templates http://jade-lang.com/tutorial/http://jade-lang.com/tutorial/ JavaScript and Jade Templating http://www.slideshare.net/wearefractal/jade-javascript- templating

20 ©2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "02 | Introduction to Express Framework Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist."

Similar presentations


Ads by Google