![]() ![]() You can also pass in the path to your JSON config file, like so: companion -config /path/to/uppyconf.json Set environment variables first: export COMPANION_SECRET = "shh!Issa Secret!" export COMPANION_DOMAIN = "YOUR SERVER DOMAIN" export COMPANION_DATADIR = "PATH/TO/DOWNLOAD/DIRECTORY" See Configure Standalone for the variables required. Please make sure that the required environment variables are set before running/using Companion as a standalone server. // If you are using something else in your app, you can add these // middlewares in the same subpath as Companion instead.Īpp. You can add it like this if you use those throughout your app. import express from 'express' import bodyParser from 'body-parser' import session from 'express-session' import companion from const app = express ( ) // Companion requires body-parser and express-session middleware. This returns an object with an app property which is a server instance that you can mount on a subpath in your Express or app. app() method, passing in an options object as a parameter. To plug Companion into an existing server, call its. ![]() UsageĬompanion may either be used as a pluggable express app, which you plug into your already existing server, or it may also be run as a standalone server: Plugging into an existing express server It may work, and we’re happy to accept improvements in this area, but we can’t provide support. Unfortunately, Windows is not a supported platform right now. Since v4.0.0, you now need to be running Node.js >= v14.19.0 to use Companion. Install from NPM: npm install you don’t have a Node.js project with a package.json you might want to install/run Companion globally like so: npm install -g Prerequisite
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |