FileBazaar's configuration options can be managed using the `_filebazaar.yaml` file or via environment variables.
All config options are optional and have sane defaults, except for `token_secret` which is required. See [`lib/config.js`](https://github.com/shesek/filebazaar/blob/master/lib/config.js) for more details.
You can use `$ filebazaar init [directory]` to initialize a new `_filebazaar.yaml` config file. A random `token_secret` will be added for you. If no `[directory]` is specified, the file will be created in the working directory.
To start FileBazaar, run `$ filebazaar [path]`. You can either specify the path to the files directory or to the `_filebazaar.yaml` file. If none is specified, defaults to the working directory.
## File Preview
FileBazaar can currently generate previews for the following file types:
- Images: a preview image will be generated by pixelating the left-half and adding watermark text using [node-canvas](https://github.com/Automattic/node-canvas) and [graphicsmagick](http://www.graphicsmagick.org) (see [example image](https://i.imgur.com/OmrUysL.png)).
- Videos & audio: a preview will be generated by slicing off the first 30 seconds using [ffmpeg](http://ffmpeg.org).
- Documents: a preview image of the first page of the document will be generated using [unoconv](https://github.com/dagwieers/unoconv) (supports pdf, doc, docx, odt, and many others).
In addition, EXIF metadata will be extracted using [exiftool](https://www.sno.phy.queensu.ca/~phil/exiftool/) and displayed for all file types.