nodeclub/config.default.js
2014-09-06 23:05:31 +08:00

132 lines
3.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* config
*/
var path = require('path');
var pkg = require('./package.json');
var debug = true;
var config = {
// debug 为 true 时,用于本地调试
debug: debug,
mini_assets: !debug, // 是否启用静态文件的合并压缩详见视图中的Loader
name: 'Nodeclub', // 社区名字
description: 'Node Club 是用 Node.js 开发的社区软件', // 社区的描述
// 添加到 html head 中的信息
site_headers: [
'<meta name="author" content="EDP@TAOBAO" />',
],
site_logo: '/public/images/logo.png', // default is `name`
site_icon: '/public/images/cnode_icon_32.png', // 默认没有 favicon, 这里填写网址
// 右上角的导航区
site_navs: [
// 格式 [ path, title, [target=''] ]
[ '/about', '关于' ],
],
// cdn host如 http://cnodejs.qiniudn.com
site_static_host: '', // 静态文件存储域名
// 社区的域名
host: 'localhost',
// 默认的Google tracker ID自有站点请修改申请地址http://www.google.com/analytics/
google_tracker_id: 'UA-41753901-5',
// mongodb 配置
db: 'mongodb://127.0.0.1/node_club_dev',
db_name: 'node_club_dev',
session_secret: 'node_club', // 务必修改
auth_cookie_name: 'node_club',
// 程序运行的端口
port: 3000,
// 话题列表显示的话题数量
list_topic_count: 20,
// 限制发帖时间间隔,单位:毫秒
post_interval: 2000,
// RSS配置
rss: {
title: 'CNodeNode.js专业中文社区',
link: 'http://cnodejs.org',
language: 'zh-cn',
description: 'CNodeNode.js专业中文社区',
//最多获取的RSS Item数量
max_rss_items: 50
},
// site links
site_links: [
{
'text': 'Node.js 官网',
'url': 'http://nodejs.org/',
},
{
text: 'Ruby-China',
url: 'https://ruby-china.org/',
},
{
text: 'Golang中国',
url: 'http://golangtc.com/',
},
],
// 邮箱配置
mail_opts: {
host: 'smtp.126.com',
port: 25,
auth: {
user: 'club@126.com',
pass: 'club'
}
},
//weibo app key
weibo_key: 10000000,
// admin 可删除话题,编辑标签,设某人为达人
admins: { user_login_name: true },
// github 登陆的配置
GITHUB_OAUTH: {
clientID: 'your GITHUB_CLIENT_ID',
clientSecret: 'your GITHUB_CLIENT_SECRET',
callbackURL: 'http://cnodejs.org/auth/github/callback',
},
// 是否允许直接注册(否则只能走 github 的方式)
allow_sign_up: true,
// newrelic 是个用来监控网站性能的服务
newrelic_key: 'yourkey',
//7牛的access信息用于文件上传
qn_access: {
accessKey: 'your access key',
secretKey: 'your secret key',
bucket: 'your bucket name',
domain: 'http://{bucket}.qiniudn.com',
},
//文件上传配置
//注:如果填写 7牛access则会上传到 7牛以下配置无效
upload: {
path: path.join(__dirname, 'public/upload/'),
url: '/public/upload/'
},
// 版块
tabs: [
['share', '分享'],
['ask', '问答'],
['job', '招聘']
],
};
module.exports = config;