adding env variables

This commit is contained in:
sairaj mote 2024-01-11 22:23:12 +05:30
parent cf35cfd15d
commit 339fd6affe
3 changed files with 4 additions and 3 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
node_modules node_modules
.env

View File

@ -18,7 +18,7 @@ const limiter = rateLimit({
app.use(limiter); app.use(limiter);
// connect to MongoDB // connect to MongoDB
mongoose.connect('mongodb://localhost/price-history'); mongoose.connect(`mongodb://${HOST}/price-history`);
const db = mongoose.connection; const db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:')); db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', () => { db.once('open', () => {

2
index.min.js vendored

File diff suppressed because one or more lines are too long