adding env variables
This commit is contained in:
parent
cf35cfd15d
commit
339fd6affe
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
node_modules
|
||||
.env
|
||||
2
index.js
2
index.js
@ -18,7 +18,7 @@ const limiter = rateLimit({
|
||||
app.use(limiter);
|
||||
|
||||
// connect to MongoDB
|
||||
mongoose.connect('mongodb://localhost/price-history');
|
||||
mongoose.connect(`mongodb://${HOST}/price-history`);
|
||||
const db = mongoose.connection;
|
||||
db.on('error', console.error.bind(console, 'connection error:'));
|
||||
db.once('open', () => {
|
||||
|
||||
2
index.min.js
vendored
2
index.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user