title: node js using express and restify together in one app
body: <p>I am using restify building apis, it works great. But I need to render some web pages as well in the same application.</p>
  
  <p>Is it possible I can use express and restify together in one application?</p>
  
  <p>this is the code for restify server in app.js</p>
  
  <pre><code>var restify = require('restify');
  var mongoose = require('mongoose');
  
  
  var server = restify.createServer({
      name : "api_app"
  });
  
  server.use(restify.queryParser());
  server.use(restify.bodyParser());
  server.use(restify.CORS());
  mongoose.connect('mongodb://localhost/db_name');
  server.get('/', routes.index);
  
  server.post('/api_name', api.api_name);
  
  
  server.listen(8000 ,"localhost", function(){
      console.log('%s listening at %s ', server.name , server.url);
  });
  </code></pre>
  
  <p>how do I create express server in the same app.js?</p>
  
  <p>Thanks</p>