afn

angular-filemanager-nodejs-bridge

Node.js bridge for angular-filemanager

Showing:

Popularity

Downloads/wk

1

Maintenance

No Maintenance Data Available

Package

Dependencies

10

Size (min+gzip)

464.5KB

License

AGPL-3.0

Type Definitions

Tree-Shakeable

No?

Categories

Readme

angular-filemanager-nodejs-bridge

This project provides a backend for the fantastic angular-filemanager UI written with Node.js and Express.

CAUTION: This project is a work in progress!

Features

Currently the following operations are (partially) implemented:

TODO

Usage (standalone)

  1. Checkout this Git repository:

    git clone https://github.com/fkoester/angular-filemanager-nodejs-bridge.git
    
  2. Install dependencies:

    npm install
    
  3. run

    DATA_DIR=/tmp npm start
    

    Change DATA_DIR variable to the root folder you want angular-filemanager to operate on

  4. Configure angular-filemanager in your angular app:

    app.config(function (fileManagerConfigProvider) {
      var defaults = fileManagerConfigProvider.$get();
    
      fileManagerConfigProvider.set({
        listUrl: 'http://localhost:5000/list',
        downloadFileUrl: 'http://localhost:5000/download',
        uploadUrl: 'http://localhost:5000/upload',
        removeUrl: 'http://localhost:5000/remove',
        createFolderUrl: 'http://localhost:5000/createFolder',
        renameUrl: 'http://localhost:5000/rename',
        copyUrl: 'http://localhost:5000/copy'
      });
    });
    

Using Docker

You can also run this server via Docker using the image maestroalubia/angular-filemanager-nodejs-bridge.

The easiest way to get it up running is using docker-compose, just run docker-compose up in the project root. This exports the host's /tmp directory. You can change this by changing the docker-compose.yml file.

Usage (in other express application)

If you want to integrate this bridge into your own Express application you can do so by adding it as a dependency:

  1. Install via npm

    npm install --save angular-filemanager-nodejs-bridge
    
  2. Import and configure the router

    const express = require('express');
    const filesRouter = require('angular-filemanager-nodejs-bridge').router;
    const routes = express.Router();
    
    routes.use('/files', filesRouter);
    
  3. Configure a custom base dir function (optional)

    const pathresolver = require('angular-filemanager-nodejs-bridge').pathresolver;
    
    pathresolver.baseDir = function(req) {
    
      if(req.body.username = 'foo') {
        return '/foo';
      }
    
      return '/bar';
    };
    

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial