2014-06-16 58 views

回答

0

我發現我可以通過在express-server.js中添加新文件來做到這一點

if (proxyMethod === 'stub') { 
    grunt.log.writeln('Using API Stub'); 

    // Load API stub routes 
    app.use(express.json()); 
    app.use(express.urlencoded()); 
    require('../api-stub/sales/sales.js')(app); 
    require('../api-stub/contact/contact.js')(app);