Adds a docker-compose for the redis datastore. Also adds a .env file and .env.example, and reworks the config.ts file a bit.
Now, environment variables set all sensitive values (e.g. tokens), rather than config.json setting them. Because we needed to support a transform (in the case of plex), I created a separate plex.ts config file that combines the env variables and the transform config (which doesn't work very well in .env since it's an array of config objects).
You'll need docker installed w/ docker compose (comes by default). The idea is that this will make it easier to add new dependencies to the project (e.g. sqlite) - rather than having to install them manually, you can just install docker and it'll take care of the rest.
To test it locally, you can try:
Copying .env.example to .env
Replacing your .env values with the actual values for discord, etc
Running docker-compose up -d (as a heads up - you might get a prompt to run docker compose up -d instead, docker is deprecating docker-compose and replacing it with docker compose, but the two APIs are meant to be identical)
Adds a docker-compose for the redis datastore. Also adds a .env file and .env.example, and reworks the config.ts file a bit.
Now, environment variables set all sensitive values (e.g. tokens), rather than
config.json
setting them. Because we needed to support a transform (in the case of plex), I created a separateplex.ts
config file that combines the env variables and the transform config (which doesn't work very well in .env since it's an array of config objects).You'll need docker installed w/ docker compose (comes by default). The idea is that this will make it easier to add new dependencies to the project (e.g. sqlite) - rather than having to install them manually, you can just install docker and it'll take care of the rest.
To test it locally, you can try:
docker-compose up -d
(as a heads up - you might get a prompt to rundocker compose up -d
instead, docker is deprecatingdocker-compose
and replacing it withdocker compose
, but the two APIs are meant to be identical)npm start