Apply prettier formatting

This commit is contained in:
TSR Berry 2023-05-29 17:15:50 +02:00
parent 3bcc7d8a22
commit bba3b1f395
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2
4 changed files with 17 additions and 17 deletions

View file

@ -40,10 +40,10 @@ If you'd like to support the project financially, Ryujinx has an active Patreon
All developers working on the project do so in their free time, but the project has several expenses: All developers working on the project do so in their free time, but the project has several expenses:
* Hackable Nintendo Switch consoles to reverse-engineer the hardware - Hackable Nintendo Switch consoles to reverse-engineer the hardware
* Additional computer hardware for testing purposes (e.g. GPUs to diagnose graphical bugs, etc.) - Additional computer hardware for testing purposes (e.g. GPUs to diagnose graphical bugs, etc.)
* Licenses for various software development tools (e.g. Jetbrains, IDA) - Licenses for various software development tools (e.g. Jetbrains, IDA)
* Web hosting and infrastructure maintenance (e.g. LDN servers) - Web hosting and infrastructure maintenance (e.g. LDN servers)
All funds received through Patreon are considered a donation to support the project. Patrons receive early access to progress reports and exclusive access to developer interviews. All funds received through Patreon are considered a donation to support the project. Patrons receive early access to progress reports and exclusive access to developer interviews.

View file

@ -20,7 +20,7 @@ export const logger = loggerInstance.child({
// Init express server // Init express server
export const app = express(); export const app = express();
app.set('view engine', 'ejs'); app.set("view engine", "ejs");
// This is set by NODE_ENV // This is set by NODE_ENV
if (app.get("env") === "production") { if (app.get("env") === "production") {

View file

@ -3,7 +3,7 @@ import { app, logger } from "./app";
import http from "http"; import http from "http";
const server = http.createServer(app); const server = http.createServer(app);
server.listen(parseInt(env.PORT || "3000"), (env.HOST || "127.0.0.1")); server.listen(parseInt(env.PORT || "3000"), env.HOST || "127.0.0.1");
server.on("error", (error: Error) => { server.on("error", (error: Error) => {
logger.error("An error occurred.", error); logger.error("An error occurred.", error);

View file

@ -3,19 +3,19 @@ import { logger } from "./app";
import { loggerDefaultMetadata } from "./utils"; import { loggerDefaultMetadata } from "./utils";
export function requestLogger(req: Request, res: Response, next: NextFunction) { export function requestLogger(req: Request, res: Response, next: NextFunction) {
logger.debug("Incoming request.", loggerDefaultMetadata(req)); logger.debug("Incoming request.", loggerDefaultMetadata(req));
next(); next();
} }
export function errorLogger( export function errorLogger(
err: Error, err: Error,
req: Request, req: Request,
res: Response, res: Response,
next: NextFunction next: NextFunction
) { ) {
logger.error(err.message, { logger.error(err.message, {
error: err, error: err,
...loggerDefaultMetadata(req), ...loggerDefaultMetadata(req),
}); });
next(err); next(err);
} }