title: NodeJS app not answering any request on GAE while working locally
body: <p>I'm trying to develop an Angular Universal app to be deployed on a Google App Engine NodeJS standard environment.</p>
  
  <p>The app works fine locally by running <code>node server.js</code>.</p>
  
  <p>When deploying to GAE, however, the page keeps loading and it ultimately fails. In the Google Cloud Console Logs viewer I see this message: <code>Process terminated because the request deadline was exceeded. (Error code 123)</code>.</p>
  
  <p>In the <code>package.json</code> the start command is <code>"node server.js"</code>, while in the app.yaml I declare only the following: <code>runtime: nodejs8</code>.</p>
  
  <p>The server code (in TS, packed as JS with WebPack):</p>
  
  <pre><code>import { enableProdMode } from '@angular/core';
  import * as ngUniversal from '@nguniversal/express-engine';
  import * as compression from 'compression';
  import * as express from 'express';
  import * as path from 'path';
  import * as detector from 'spider-detector';
  import * as appServer from '../dist/server/main.js';
  require('zone.js/dist/zone-node');
  
  const ROOT = path.resolve();
  
  enableProdMode();
  
  const app = express();
  
  // Server-side rendering
  function angularRouter(req, res): void {
    res.render('index', { req, res });
  }
  
  // Enable compression
  app.use(compression());
  
  // Check if the user is a bot
  app.use(detector.middleware());
  
  // Root route before static files, or it will serve a static index.html, without pre-rendering
  app.get('/', angularRouter);
  
  // Serve the static files generated by the CLI (index.html, CSS? JS, assets...)
  app.use(express.static('client'));
  
  // Configure Angular Express engine
  app.engine('html', ngUniversal.ngExpressEngine({
    bootstrap: appServer.AppServerModuleNgFactory
  }));
  app.set('view engine', 'html');
  app.set('views', path.join(ROOT, 'client'));
  
  app.listen(3000, () =&gt; {
    console.log('Listening on http://localhost:3000');
  });
  </code></pre>
  
  <p>In the Google Cloud Console Logs viewer I successfully see "Listening on <a href="http://localhost:3000" rel="nofollow noreferrer">http://localhost:3000</a>".</p>