showcase: server directory is not required
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Thu, 27 Aug 2015 01:08:59 +0000 (03:08 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Thu, 27 Aug 2015 01:08:59 +0000 (03:08 +0200)
angularjs/showcase/server/favicon.ico [deleted file]
angularjs/showcase/server/server.config.js [deleted file]
angularjs/showcase/server/server.js [deleted file]

diff --git a/angularjs/showcase/server/favicon.ico b/angularjs/showcase/server/favicon.ico
deleted file mode 100644 (file)
index b8e4f5f..0000000
Binary files a/angularjs/showcase/server/favicon.ico and /dev/null differ
diff --git a/angularjs/showcase/server/server.config.js b/angularjs/showcase/server/server.config.js
deleted file mode 100644 (file)
index 6616a66..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-module.exports = function() {
-  var main = './src/showcase/';
-  var config = {
-    main: main,
-    index: main + 'index.html',
-    port: 9000,
-    script: 'server/server.js',
-    directory: './server/'
-  };
-
-  return config;
-};
diff --git a/angularjs/showcase/server/server.js b/angularjs/showcase/server/server.js
deleted file mode 100644 (file)
index c9a0b14..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-'use strict';
-
-var express = require('express');
-var app = express();
-var favicon = require('serve-favicon');
-var logger = require('morgan');
-var config = require('./server.config')();
-var port = config.port;
-var environment = process.env.NODE_ENV;
-var verbose = process.env.VERBOSE;
-
-app.use(favicon(__dirname + '/favicon.ico'));
-if (verbose && verbose === true) {
-  app.use(logger('dev'));
-}
-
-switch (environment) {
-  case 'production':
-    console.log('production mode');
-
-    app.use(express.static('./build/'));
-
-    // Deep linking
-    app.use('/*', express.static('./build/index.html'));
-    break;
-  case 'ngdocs':
-    console.log('ngdocs mode');
-
-    app.use(express.static('./docs'));
-
-    // Deep linking
-    app.use('/*', express.static('./docs'));
-    break;
-  default:
-    console.log('development mode');
-
-    app.use(express.static(config.main));
-    app.use(express.static('./'));
-
-    // Deep linking
-    app.use('/*', express.static(config.index));
-    break;
-}
-
-app.listen(port, function() {
-  console.log('Express server listening on port ' + port);
-  console.log('env = ' + app.get('env') +
-    '\n __dirname = ' + __dirname +
-    '\n process.cwd = ' + process.cwd());
-});