title: Unable to find module 'server', added express to Ember-Cli app
body: <p>I've added an expressJS app inside my ember app so I can provide a backend API for my ember app. </p>
  
  <p><strong>My process:</strong> </p>
  
  <pre><code>npm install express --save
  </code></pre>
  
  <p>I created a folder called "server" in the route of my ember application and inside that a file called "server.js".</p>
  
  <p>Yesterday I had it working fine, I already had my ember app running via <code>ember s</code> and tested out the express app using <code>nodemon server/server.js</code> and checking the endpoints I created with Postman. </p>
  
  <p>However this morning when I've tried to run <code>ember s</code> I'm given the following error:</p>
  
  <pre><code>C:\Sandbox\tsodash&gt;ember s
  version: 2.3.0-beta.2
  Cannot find module 'C:\Sandbox\tsodash\server'
  Error: Cannot find module 'C:\Sandbox\tsodash\server'
      at Function.Module._resolveFilename (module.js:339:15)
      at Function.Module._load (module.js:290:25)
      at Module.require (module.js:367:17)
      at require (internal/module.js:16:19)
      at Project.require (C:\Sandbox\tsodash\node_modules\ember-cli\lib\models\project.js:281:12)
      at Class.module.exports.Task.extend.processAppMiddlewares (C:\Sandbox\tsodash\node_modules\ember-cli\lib\tasks\server\express-server.js:115:33)
      at Class.&lt;anonymous&gt; (C:\Sandbox\tsodash\node_modules\ember-cli\lib\tasks\server\express-server.js:220:21)
      at lib$rsvp$$internal$$tryCatch (C:\Sandbox\tsodash\node_modules\ember-cli\node_modules\rsvp\dist\rsvp.js:1036:16)
      at lib$rsvp$$internal$$invokeCallback (C:\Sandbox\tsodash\node_modules\ember-cli\node_modules\rsvp\dist\rsvp.js:1048:17)
      at C:\Sandbox\tsodash\node_modules\ember-cli\node_modules\rsvp\dist\rsvp.js:331:11
  </code></pre>
  
  <p>Naturally I assumed I just needed to use <code>modules.exports = function(){ //..expressjs code}</code></p>
  
  <p><strong>Full Code</strong></p>
  
  <pre><code>var express = require('express');
  var app = express();
  var bodyParser = require('body-parser');
  var request = require('request');
  var btoa = require('btoa');
  var config = require('./config');
  var _ = require('lodash');
  
  
  module.exports = function(){
  
    var endPoints = config.endPoints;
    app.use(bodyParser.urlencoded({
      extended: true
    }));
    app.use(bodyParser.json());
  
    var port = process.env.PORT || 4200;
  
    var router = express.Router();
  
    // middleware to use for all requests
    router.use(function (req, res, next) {
      // do logging
      console.log('Something is happening.');
      next(); // make sure we go to the next routes and don't stop here
    });
  
  
    router.get('/', function (req, res) {
      res.json({
        message: 'TSO Git Dash'
      });
    });
  
    //  ..      
    app.use('/api', router);
  
    app.listen(port);
    console.log('Magic happens on port: ' + port);
  }
  </code></pre>
  
  <p>Still no avail. </p>
  
  <p>Folder structure:</p>
  
  <p><a href="https://i.stack.imgur.com/wT8Z1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wT8Z1.jpg" alt="Folder structure"></a></p>
  
  <p>Any ideas? I'm assuming it's something simple that I've missed. But I'm stumped. </p>