ember-cli-deploy / ember-cli-deploy/ember-cli-deploy-redis

Simple redis url does not work

Aperta
#103 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
17
Fork
40
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Running a js app inside a container,

In `deploy.js` I have the following simple config

```
ENV.redis = {
url: process.env['REDIS_URL']
}
```

The url in the env is `REDIS_URL=redis://redis:6379/0`

Apparently it will fail to parse as it will still try to connect to localhost (the default host).

To work around it I need to do the parsing myself:

```js
const { URL } = require('url');
const redisURL = new URL(process.env['REDIS_URL'])

ENV.redis = {
host: redisURL.hostname,
port: redisURL.port,
username: redisURL.username,
password: redisURL.password
};
```

It will be ideal to have the parsing done by this library.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.