forked from maodouio/meteor-react-redux-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
38 lines (31 loc) · 1.17 KB
/
main.js
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
import App from './lib/app';
import createContext from './context';
import collectionsMiddleware from '../lib/middlewares/collections';
import configMiddleware from '../lib/middlewares/configs';
import middlewareMiddleware from './lib/middlewares/middleware';
import coreModule from './';
import postsModule from 'maodou/posts/server';
import eventsModule from 'maodou/events/server';
import wechatModule from 'maodou/wechat/server';
import bizplansModule from 'maodou/bizplans/server';
import customersModule from 'maodou/customers/server';
import singlePagesModule from 'maodou/singlePages/server';
// import addTemplateModule from 'maodou/addTemplate/server';
//系统变量MAIL_URL配置,暂时放在这里
process.env.MAIL_URL = Meteor.settings.mailUrl;
const context = createContext();
const app = new App(context);
app.loadMiddlewares([
collectionsMiddleware(),
configMiddleware,
middlewareMiddleware
]);
app.loadModule(coreModule);
app.loadModule(wechatModule);
app.loadModule(postsModule);
app.loadModule(eventsModule);
app.loadModule(bizplansModule);
app.loadModule(customersModule);
app.loadModule(singlePagesModule);
// app.loadModule(addTemplateModule);
app.init();