flux-drive

0.17.23 • Public • Published

FLUX-Drive

Content Management System for Node.js and React

Setup

  1. Install flux-drive npm:
npm install flux-drive --save
  1. Create flux-drive.js in your project root path:
exports.config = {
 
    /**
    * General Settings
    */
 
    general: {
        projectKey: "------------PERMALINK------------",
        allowRegistration: true,
        allowMediaRemove: true
    },
 
    /**
    * Database Settings (MongoDB)
    */
 
    db: {
        development: {
            url: 'mongodb://USER:PASSWORD@HOST:PORT/NAME'
        },
        staging: {
            url: 'mongodb://USER:PASSWORD@HOST:PORT/NAME'
        },
        production: {
            url: 'mongodb://USER:PASSWORD@HOST:PORT/NAME'
        }
    },
 
    /**
    * CDN (Amazon S3)
    */
 
    cdn: {    
        development: {            
            accessKeyId: "----------AWS-KEY-ID----------",
            secretAccessKey: "----------AWS-SECRET----------",
            bucket: "----------S3-CONTENT-BUCKET-NAME----------",
            cdnUrl: "//----------URL-TO-CONTENT-BUCKET----------/",
            assetsUrl: "//----------URL-TO-ASSETS-BUCKET----------/",
            maxFileSize: '15mb',
            region: 'us-east-1'
        },
        staging: {            
            accessKeyId: "----------AWS-KEY-ID----------",
            secretAccessKey: "----------AWS-SECRET----------",
            bucket: "----------S3-CONTENT-BUCKET-NAME----------",
            cdnUrl: "//----------URL-TO-CONTENT-BUCKET----------/",
            assetsUrl: "//----------URL-TO-ASSETS-BUCKET----------/",
            maxFileSize: '15mb',
            region: 'us-east-1'
        },
        production: {            
            accessKeyId: "----------AWS-KEY-ID----------",
            secretAccessKey: "----------AWS-SECRET----------",
            bucket: "----------S3-CONTENT-BUCKET-NAME----------",
            cdnUrl: "//----------URL-TO-CONTENT-BUCKET----------/",
            assetsUrl: "//----------URL-TO-ASSETS-BUCKET----------/",
            maxFileSize: '15mb',
            region: 'us-east-1'
        }
    },
 
    /**
     * Mailer Settings (Amazon SES)
     */
 
    mailer: {        
        development: {
            accessKeyId: "----------AWS-KEY-ID----------",
            secretAccessKey: "----------AWS-SECRET----------",
            sender: "----------NO-REPLY@YOUR-DOMAIN----------"
        },
        staging: {
            accessKeyId: "----------AWS-KEY-ID----------",
            secretAccessKey: "----------AWS-SECRET----------",
            sender: "----------NO-REPLY@YOUR-DOMAIN----------"
        },
        production: {
            accessKeyId: "----------AWS-KEY-ID----------",
            secretAccessKey: "----------AWS-SECRET----------",
            sender: "----------NO-REPLY@YOUR-DOMAIN----------"
        }
    }
 
};
  1. Require flux-drive before your routes
(...)
 
// Load Flux-Drive
 
require('flux-drive')(app);
 
// Your Routes
 
var routes = require('./api/routes');
app.use(routes);
 
(...)

Readme

Keywords

none

Package Sidebar

Install

npm i flux-drive

Weekly Downloads

1

Version

0.17.23

License

none

Unpacked Size

1.68 MB

Total Files

141

Last publish

Collaborators

  • henriquebf
  • 0nn0