Express Introduction
Ahmed Elbassel
Email: elbassel.n13@gmail.com
Skype: ahmed_elbassel
Express Introduction
1. What is Express?
2. Express Alternatives
3. Hello World, Express example
4. Creating Routers
5. Exercise
6. Make Routers in a separate modules.
1.What is Express?
- Express 3.x is a light-weight web application framework to help organize your
web application into an MVC architecture on the server side.
- Express is a routing and middleware web framework that has minimal
functionality of its own: An Express application is essentially a series of
middleware function calls.
- http://expressjs.com/
2. Express Alternatives
3. Hello World, Express Example
4. Creating Routers
- A router object is an isolated instance of middleware and routes. You can
think of it as a “mini-application,” capable only of performing middleware and
routing functions.
- You can call the router as Controller.
- To create a router:
4. Creating Routers
- Handle incoming requests:
- router.METHOD(path, [callback, ...] callback)
- Finally, add the router to express application:
5. Exercise
- Write an app with three routes; all them to provide some data; to provide the
following:
- /home: reply with greeting message from the home page
- /contacts: reply with your contacts.
- /profiles: reply with your profile
6. Make router in a separate modules
- It’s too simple, expose the router in a module.
Questions

08 express introduction

  • 1.
    Express Introduction Ahmed Elbassel Email:elbassel.n13@gmail.com Skype: ahmed_elbassel
  • 2.
    Express Introduction 1. Whatis Express? 2. Express Alternatives 3. Hello World, Express example 4. Creating Routers 5. Exercise 6. Make Routers in a separate modules.
  • 3.
    1.What is Express? -Express 3.x is a light-weight web application framework to help organize your web application into an MVC architecture on the server side. - Express is a routing and middleware web framework that has minimal functionality of its own: An Express application is essentially a series of middleware function calls. - http://expressjs.com/
  • 4.
  • 5.
    3. Hello World,Express Example
  • 6.
    4. Creating Routers -A router object is an isolated instance of middleware and routes. You can think of it as a “mini-application,” capable only of performing middleware and routing functions. - You can call the router as Controller. - To create a router:
  • 7.
    4. Creating Routers -Handle incoming requests: - router.METHOD(path, [callback, ...] callback) - Finally, add the router to express application:
  • 8.
    5. Exercise - Writean app with three routes; all them to provide some data; to provide the following: - /home: reply with greeting message from the home page - /contacts: reply with your contacts. - /profiles: reply with your profile
  • 9.
    6. Make routerin a separate modules - It’s too simple, expose the router in a module.
  • 10.