From b5bdfa51bc9c94e5a9e9153437e8be7ffc6f2fb7 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 07:45:17 +0000 Subject: [PATCH] style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf This commit fixes the style issues introduced in b6c1ce5 according to the output from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf. Details: None --- src/app.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/app.js b/src/app.js index a2ed7cd55..286ba6401 100644 --- a/src/app.js +++ b/src/app.js @@ -1,35 +1,35 @@ -const express = require("express"); -const bodyParser = require("body-parser"); -const cors = require("cors"); -const mongoose = require("mongoose"); +const express = require('express') +const bodyParser = require('body-parser') +const cors = require('cors') +const mongoose = require('mongoose') -const { JWT_SECRET, MONGODB_URI } = process.env; +const { JWT_SECRET, MONGODB_URI } = process.env -const app = express(); +const app = express() -app.use(bodyParser.json()); -app.use(cors()); +app.use(bodyParser.json()) +app.use(cors()) -const router = require("./routes"); -app.use("/api", router); +const router = require('./routes') +app.use('/api', router) const connectToMongoDB = async () => { try { await mongoose.connect(MONGODB_URI, { useNewUrlParser: true, useUnifiedTopology: true, - useCreateIndex: true, - }); - console.log("Connected to MongoDB"); + useCreateIndex: true + }) + console.log('Connected to MongoDB') } catch (error) { - console.error("Failed to connect to MongoDB", error); - process.exit(1); + console.error('Failed to connect to MongoDB', error) + process.exit(1) } -}; +} -connectToMongoDB(); +connectToMongoDB() -const PORT = process.env.PORT || 5000; +const PORT = process.env.PORT || 5000 app.listen(PORT, () => { - console.log(`Server running on port ${PORT}`); -}); + console.log(`Server running on port ${PORT}`) +})