place derby.use before createApp
fix js template as well
Merge pull request #249 from codeparty/derbynew

place derby.use before createApp