Turn audio into a shareable video. forked from nypublicradio/audiogram

index.js 1.7KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. For details on these options, read SERVER.md
  3. Basic options:
  4. workingDirectory - where to keep temporary files (required)
  5. storagePath - where to keep generated audio/videos (required)
  6. fonts - a list of custom fonts (see THEMES.md for details)
  7. maxUploadSize - the maximum audio upload size, in bytes
  8. Fancy server options:
  9. s3Bucket - a bucket to store generated audio/videos. If storagePath is also set, it will store files at s3://[s3Bucket]/[storagePath]/
  10. redisHost - a redis host name/address to use for tracking jobs (e.g. "1.2.3.4" or "127.0.0.1")
  11. worker - if this is truthy, the server will add jobs to a queue. Otherwise, it will render videos on the spot itself
  12. */
  13. var path = require("path");
  14. module.exports = {
  15. workingDirectory: path.join(__dirname, "..", "tmp"),
  16. storagePath: "applications/audiogram/media",
  17. s3Bucket: process.env.S3_BUCKETS_NAME,
  18. fonts: [
  19. { family: "NYT Franklin", file: path.join(__dirname, "fonts", "nyt-franklin-500-normal.woff") },
  20. { family: "NYT Franklin Bold", file: path.join(__dirname, "fonts", "nyt-franklin-700-normal.woff") },
  21. { family: "Source Sans Pro", file: path.join(__dirname, "fonts", "SourceSansPro-Regular.ttf") },
  22. { family: "Source Sans Pro", file: path.join(__dirname, "fonts", "SourceSansPro-Light.ttf"), weight: 300 },
  23. { family: "Source Sans Pro", file: path.join(__dirname, "fonts", "SourceSansPro-Bold.ttf"), weight: "bold" },
  24. { family: "Source Sans Pro", file: path.join(__dirname, "fonts", "SourceSansPro-Italic.ttf"), style: "italic" },
  25. { family: "Source Sans Pro", file: path.join(__dirname, "fonts", "SourceSansPro-BoldItalic.ttf"), weight: "bold", style: "italic" }
  26. ],
  27. redisHost: process.env.REDIS_URI,
  28. worker: true
  29. };