mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 04:51:16 +08:00
saving port to a variable
This commit is contained in:
parent
8cb954dd88
commit
7d4759017c
1 changed files with 4 additions and 2 deletions
|
@ -9,6 +9,8 @@ const admin = require("firebase-admin");
|
|||
const serviceAccount = require("./credentials/serviceAccountKey.json");
|
||||
const { connectDB } = require("./init/mongodb");
|
||||
|
||||
const PORT = process.env.PORT || 5005;
|
||||
|
||||
// MIDDLEWARE & SETUP
|
||||
const app = express();
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
|
@ -23,8 +25,8 @@ app.use(function (e, req, res, next) {
|
|||
return res.status(e.status || 500).json(e || {});
|
||||
});
|
||||
|
||||
app.listen(process.env.PORT || 5005, async () => {
|
||||
console.log(`listening on port ${process.env.PORT}`);
|
||||
app.listen(PORT, async () => {
|
||||
console.log(`listening on port ${PORT}`);
|
||||
await connectDB();
|
||||
admin.initializeApp({
|
||||
credential: admin.credential.cert(serviceAccount),
|
||||
|
|
Loading…
Reference in a new issue