forked from yono38/node-gtfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
19 lines (18 loc) · 796 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var url = require('url')
, mongo_url = process.env.MONGOHQ_URL || 'mongodb://localhost:27017/gtfs'
, parsed_url = url.parse(mongo_url)
, mongo_host = parsed_url.hostname
, mongo_port = parsed_url.port
, mongo_database = parsed_url.pathname.replace(/^\//, '');
if (parsed_url.auth !== null) {
var mongo_username = parsed_url.auth.split(':')[0]
, mongo_password = parsed_url.auth.split(':')[1];
}
module.exports = {
mongo_url: process.env.MONGOHQ_URL || 'mongodb://localhost:27017/gtfs'
, agencies: [
/* Put agency_key names from gtfs-data-exchange.com.
Optionally, specify a download URL to use a dataset not from gtfs-data-exchange.com */
{ agency_key: 'capital-metro', url: 'http://www.gtfs-data-exchange.com/agency/capital-metro/latest.zip' }
]
}