flux-drive
v0.17.23
Published
Content Management Framework by Pillar
Downloads
270
Readme
FLUX-Drive
Content Management System for Node.js and React
Setup
- Install
flux-drive
npm:
npm install flux-drive --save
- 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----------"
}
}
};
- Require
flux-drive
before your routes
(...)
// Load Flux-Drive
require('flux-drive')(app);
// Your Routes
var routes = require('./api/routes');
app.use(routes);
(...)