02 | Introduction to Express Framework Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist
What is Express Installing & Using Express Demo: Creating a simple Rest API Templating Module Overview
02 | What is Express Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist
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.
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.
02 | Installing and Using Express Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist
Installing and Using Express npm install express npm install jade
02 | Creating a Simple Rest API Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist
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: – To a request handler (callback) app.get('/index', function (req, res) {});
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);
DEMO Creating a simple Rest API with Express Framework
Why use Express?
Resources Express Framework Intro to Express net net Jade Templates JavaScript and Jade Templating templating
©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.