-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
64 lines (53 loc) · 1.82 KB
/
app.js
File metadata and controls
64 lines (53 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
'use strict';
/*
* Defining the Package
*/
var Module = require('meanio').Module;
var MeanCrop = new Module('mean-crop');
/*
* All MEAN packages require registration
* Dependency injection is used to define required modules
*/
MeanCrop.register(function(app, auth, database) {
//We enable routing. By default the Package Object is passed to the routes
MeanCrop.routes(app, auth, database);
//We are adding a link to the main menu for all authenticated users
MeanCrop.menus.add({
title: 'meanCrop example page',
link: 'meanCrop example page',
roles: ['authenticated'],
menu: 'main'
});
MeanCrop.aggregateAsset('js', '/node_modules/mean-crop/public/assets/lib/Jcrop/js/jquery.Jcrop.min.js', {
absolute: true
});
MeanCrop.aggregateAsset('js', '/node_modules/mean-crop/public/assets/lib/Jcrop/js/jquery.color.js', {
absolute: true
});
MeanCrop.aggregateAsset('css', '/node_modules/mean-crop/public/assets/lib/Jcrop/css/jquery.Jcrop.css', {
absolute: true
});
MeanCrop.aggregateAsset('css', '/node_modules/mean-crop/public/assets/css/meanCrop.css', {
absolute: true
});
/**
//Uncomment to use. Requires meanio@0.3.7 or above
// Save settings with callback
// Use this for saving data from administration pages
MeanCrop.settings({
'someSetting': 'some value'
}, function(err, settings) {
//you now have the settings object
});
// Another save settings example this time with no callback
// This writes over the last settings.
MeanCrop.settings({
'anotherSettings': 'some value'
});
// Get settings. Retrieves latest saved settigns
MeanCrop.settings(function(err, settings) {
//you now have the settings object
});
*/
return MeanCrop;
});