"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "server.ts" between
dspace-angular-dspace-7.0.tar.gz and dspace-angular-dspace-7.1.tar.gz

About: dspace-angular is the Angular-based frontend of DSpace, a digital repository system to capture, store, index, preserve and redistribute an organization’s research material in digital formats.

server.ts  (dspace-angular-dspace-7.0):server.ts  (dspace-angular-dspace-7.1)
skipping to change at line 44 skipping to change at line 44
import { environment } from './src/environments/environment'; import { environment } from './src/environments/environment';
import { createProxyMiddleware } from 'http-proxy-middleware'; import { createProxyMiddleware } from 'http-proxy-middleware';
import { hasValue, hasNoValue } from './src/app/shared/empty.util'; import { hasValue, hasNoValue } from './src/app/shared/empty.util';
import { APP_BASE_HREF } from '@angular/common'; import { APP_BASE_HREF } from '@angular/common';
import { UIServerConfig } from './src/config/ui-server-config.interface'; import { UIServerConfig } from './src/config/ui-server-config.interface';
/* /*
* Set path for the browser application's dist folder * Set path for the browser application's dist folder
*/ */
const DIST_FOLDER = join(process.cwd(), 'dist/browser'); const DIST_FOLDER = join(process.cwd(), 'dist/browser');
// Set path fir IIIF viewer.
const IIIF_VIEWER = join(process.cwd(), 'dist/iiif');
const indexHtml = existsSync(join(DIST_FOLDER, 'index.html')) ? 'index.html' : ' index'; const indexHtml = existsSync(join(DIST_FOLDER, 'index.html')) ? 'index.html' : ' index';
// * NOTE :: leave this as require() since this file is built Dynamically from w ebpack // * NOTE :: leave this as require() since this file is built Dynamically from w ebpack
const { ServerAppModule, ngExpressEngine } = require('./dist/server/main'); const { ServerAppModule, ngExpressEngine } = require('./dist/server/main');
const cookieParser = require('cookie-parser'); const cookieParser = require('cookie-parser');
// The Express app is exported so that it can be used by serverless Functions. // The Express app is exported so that it can be used by serverless Functions.
export function app() { export function app() {
skipping to change at line 137 skipping to change at line 139
windowMs: (environment.ui as UIServerConfig).rateLimiter.windowMs, windowMs: (environment.ui as UIServerConfig).rateLimiter.windowMs,
max: (environment.ui as UIServerConfig).rateLimiter.max max: (environment.ui as UIServerConfig).rateLimiter.max
}); });
server.use(limiter); server.use(limiter);
} }
/* /*
* Serve static resources (images, i18n messages, …) * Serve static resources (images, i18n messages, …)
*/ */
server.get('*.*', cacheControl, express.static(DIST_FOLDER, { index: false })) ; server.get('*.*', cacheControl, express.static(DIST_FOLDER, { index: false })) ;
/*
* Fallthrough to the IIIF viewer (must be included in the build).
*/
server.use('/iiif', express.static(IIIF_VIEWER, {index:false}));
// Register the ngApp callback function to handle incoming requests // Register the ngApp callback function to handle incoming requests
server.get('*', ngApp); server.get('*', ngApp);
return server; return server;
} }
/* /*
* The callback function to serve server side angular * The callback function to serve server side angular
*/ */
 End of changes. 2 change blocks. 
0 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)