Skip to content

Commit

Permalink
checking heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
enigmaticmahesh committed Sep 3, 2022
1 parent 9f34b93 commit bf5acc5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DB_NAME="backend.db"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules/
node_modules/
.env
*.db
2 changes: 1 addition & 1 deletion db.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const sqlite3 = require("sqlite3");

const SQLite3 = sqlite3.verbose();
const db = new SQLite3.Database("./backend.db");
const db = new SQLite3.Database(process.env.DB_NAME);

const sqliteWrapper = (command, method = "all") => {
return new Promise((resolve, reject) => {
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const http = require("http");
require('dotenv').config()

const expressApp = require("./app");

const PORT = 5000 || process.env.PORT;
const PORT = 5001 || process.env.PORT;
const server = http.createServer(expressApp);

server.on("error", (err) => console.log(`Error while creating server: ${err}`));
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"sqlite3": "^5.0.11"
},
"devDependencies": {
"dotenv": "^16.0.2",
"nodemon": "^2.0.19"
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ detect-libc@^2.0.0:
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd"
integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==

dotenv@^16.0.2:
version "16.0.2"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.2.tgz#0b0f8652c016a3858ef795024508cddc4bffc5bf"
integrity sha512-JvpYKUmzQhYoIFgK2MOnF3bciIZoItIIoryihy0rIA+H4Jy0FmgyKYAHCTN98P5ybGSJcIFbh6QKeJdtZd1qhA==

ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
Expand Down

1 comment on commit bf5acc5

@enigmaticmahesh
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue #1 is fixed in this commit

Please sign in to comment.