Install NodeJS file manager for TinyMCE 5 and 4

Install the package

Server side of Flmngr file manager for Node.js is an universal package providing API both for Express server and for custom code to be run aas microservice.

This package provides Node backend support for Flmngr as TypeScript/JavaScript library.

With npm installed, run:

$ npm install @edsdk/flmngr-server

Yarn users can run:

$ yarn add @edsdk/flmngr-server

Run as microservice

As far you do not have Express server, you can run Flmngr as microservice. This means it will create a new Express instance, do all required bindings and start to listen to incoming requests. Do not bother about dependencies - they all are managed automatically and you do not need to install Express package manually.

require("@edsdk/flmngr-server").startFlmngrMicroservice({
    host: 'localhost',
    port: 8080,
    url: '/flmngr',
    dirFiles: './www/files',
    dirRoot: './www'
});

The code above will:

  1. Listen http://localhost:8080/flmngr respond to the frontend of Flmngr with the requested info. This is the "File Manager URL" for configuration in Dashboard.
  2. Save uploaded files to ./www/files directory (convert this directory into URL and this will be your "Files URL" parameter for Dashboard).
  3. Serve ./www/files directory as public in order to allow accessing uploaded files by their URLs.

If you do not wish to share all files you can set dirRoot: null. This can be useful if this server has only Flmngr installed but all files really are mounted from another server and those server's URL will be used for generating file URLs too.

Example

Please also see example of Flmngr microservice in Node on our GitHub.