鲍勃の部屋
  • Blog
  • Work
  • About
  • Contact

和鲍勃一起来学Node.js--第6课

6/12/2014

0 Comments

 
本课教你创建 服务器的 路由功能

如果你以前用过其它语言的框架,应该对路由不会陌生

比如 PHP的 Laravel里专门有个routes.php用来配置路由信息,形如:

<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::get('/', function()
{
return View::make('hello');
});

Route::get ('DZGame/ID101/{operation}', 'DZGame\ID101\Controller@main');

Read More
0 Comments

    Author

    鲍勃 (上海)
    互联网码农

    小A

    Archives

    July 2014
    June 2014
    May 2014

    Categories

    All
    AngularJS
    App
    Bootstrap
    Cocos2dx-c++
    Css
    CSS3
    Design Pattern
    Express
    Funny
    Game
    Html5
    Jasmine
    Javascript
    Lua
    Music
    Node.js
    Pattern
    Phonegap
    Php
    Python
    Tdd
    Tips

    RSS Feed

Powered by Create your own unique website with customizable templates.