BETTERZON-100: Some more code reformatting

This commit is contained in:
Patrick Müller 2021-05-13 18:44:51 +02:00
parent 7ddf5ffe84
commit ce21d1f527
4 changed files with 17 additions and 16 deletions

View File

@ -15,6 +15,7 @@ import {errorHandler} from './middleware/error.middleware';
import {notFoundHandler} from './middleware/notFound.middleware';
import {usersRouter} from './models/users/users.router';
import {pricealarmsRouter} from './models/pricealarms/pricealarms.router';
const cookieParser = require('cookie-parser');
dotenv.config();

View File

@ -1,5 +1,5 @@
import HttpException from "../common/http-exception";
import { Request, Response, NextFunction } from "express";
import HttpException from '../common/http-exception';
import {Request, Response, NextFunction} from 'express';
export const errorHandler = (
error: HttpException,
@ -9,7 +9,7 @@ export const errorHandler = (
) => {
const status = error.statusCode || 500;
const message =
error.message || "It's not you. It's us. We are having some problems.";
error.message || 'It\'s not you. It\'s us. We are having some problems.';
response.status(status).send(message);
};

View File

@ -1,4 +1,4 @@
import { Request, Response, NextFunction } from "express";
import {Request, Response, NextFunction} from 'express';
export const notFoundHandler = (
request: Request,
@ -6,7 +6,7 @@ export const notFoundHandler = (
next: NextFunction
) => {
const message = "Resource not found";
const message = 'Resource not found';
response.status(404).send(message);
};

View File

@ -1,32 +1,32 @@
const webpack = require("webpack");
const path = require("path");
const nodeExternals = require("webpack-node-externals");
const webpack = require('webpack');
const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
entry: ["webpack/hot/poll?100", "./src/index.ts"],
entry: ['webpack/hot/poll?100', './src/index.ts'],
watch: false,
target: "node",
target: 'node',
externals: [
nodeExternals({
whitelist: ["webpack/hot/poll?100"]
whitelist: ['webpack/hot/poll?100']
})
],
module: {
rules: [
{
test: /.tsx?$/,
use: "ts-loader",
use: 'ts-loader',
exclude: /node_modules/
}
]
},
mode: "development",
mode: 'development',
resolve: {
extensions: [".tsx", ".ts", ".js"]
extensions: ['.tsx', '.ts', '.js']
},
plugins: [new webpack.HotModuleReplacementPlugin()],
output: {
path: path.join(__dirname, "dist"),
filename: "index.js"
path: path.join(__dirname, 'dist'),
filename: 'index.js'
}
};