Browse Source

Reogranize

master
nemanjan00 1 year ago
parent
commit
b034d7f1d9
No account linked to committer's email address
2 changed files with 14 additions and 9 deletions
  1. 3
    9
      index.js
  2. 11
    0
      src/index.js

+ 3
- 9
index.js View File

@@ -1,11 +1,5 @@
const express = require("express");
// Just a personal preference, I do not like requiring ./src inside index
// And everyone tends to look here first

const app = express();

app.set("PORT", process.env.PORT || 3000);


app.listen(3000, () => {
console.log('Example app listening on port 3000!');
});
module.exports = require("./src");


+ 11
- 0
src/index.js View File

@@ -0,0 +1,11 @@
const express = require("express");

const app = express();

app.set("PORT", process.env.PORT || 3000);


app.listen(3000, () => {
console.log('Example app listening on port 3000!');
});


Loading…
Cancel
Save