mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Add lint rule banning wildcard imports. Fix existing ones where possible.
This commit is contained in:
17
server.ts
17
server.ts
@@ -19,14 +19,17 @@ import 'zone.js/node';
|
||||
import 'reflect-metadata';
|
||||
import 'rxjs';
|
||||
|
||||
import axios from 'axios';
|
||||
import * as pem from 'pem';
|
||||
import * as https from 'https';
|
||||
/* eslint-disable import/no-namespace */
|
||||
import * as morgan from 'morgan';
|
||||
import * as express from 'express';
|
||||
import * as bodyParser from 'body-parser';
|
||||
import * as compression from 'compression';
|
||||
import * as expressStaticGzip from 'express-static-gzip';
|
||||
/* eslint-enable import/no-namespace */
|
||||
|
||||
import axios from 'axios';
|
||||
import { createCertificate } from 'pem';
|
||||
import { createServer } from 'https';
|
||||
import { json } from 'body-parser';
|
||||
|
||||
import { existsSync, readFileSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
@@ -110,7 +113,7 @@ export function app() {
|
||||
* Add parser for request bodies
|
||||
* See [morgan](https://github.com/expressjs/body-parser)
|
||||
*/
|
||||
server.use(bodyParser.json());
|
||||
server.use(json());
|
||||
|
||||
// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
|
||||
server.engine('html', (_, options, callback) =>
|
||||
@@ -266,7 +269,7 @@ function serverStarted() {
|
||||
* @param keys SSL credentials
|
||||
*/
|
||||
function createHttpsServer(keys) {
|
||||
https.createServer({
|
||||
createServer({
|
||||
key: keys.serviceKey,
|
||||
cert: keys.certificate
|
||||
}, app).listen(environment.ui.port, environment.ui.host, () => {
|
||||
@@ -320,7 +323,7 @@ function start() {
|
||||
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; // lgtm[js/disabling-certificate-validation]
|
||||
|
||||
pem.createCertificate({
|
||||
createCertificate({
|
||||
days: 1,
|
||||
selfSigned: true
|
||||
}, (error, keys) => {
|
||||
|
Reference in New Issue
Block a user