Skip to content

Commit

Permalink
style: format code with Autopep8, Black, ClangFormat, dotnet-format, …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
deepsource-autofix[bot] authored May 10, 2024
1 parent b6c1ce5 commit b5bdfa5
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -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}`)
})

0 comments on commit b5bdfa5

Please sign in to comment.