20 Star 34 Fork 11

天人合一 / ghost

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.js 913 Bytes
一键复制 编辑 原始数据 按行查看 历史
imShadow 提交于 2014-12-16 10:29 . 合并官方更新 & 升级到 0.5.7
// # Ghost bootloader
// Orchestrates the loading of Ghost
// When run from command line.
var express,
ghost,
parentApp,
errors;
// process.env.NODE_ENV = process.env.NODE_ENV || 'production'; // 4 点云
// Make sure dependencies are installed and file system permissions are correct.
require('./core/server/utils/startup-check').check();
// Proceed with startup
express = require('express');
ghost = require('./core');
errors = require('./core/server/errors');
// Create our parent express app instance.
parentApp = express();
ghost().then(function (ghostServer) {
// Mount our ghost instance on our desired subdirectory path if it exists.
parentApp.use(ghostServer.config.paths.subdir, ghostServer.rootApp);
// Let ghost handle starting our server instance.
ghostServer.start(parentApp);
}).catch(function (err) {
errors.logErrorAndExit(err, err.context, err.help);
});
NodeJS
1
https://gitee.com/diancloud/ghost.git
git@gitee.com:diancloud/ghost.git
diancloud
ghost
ghost
master

搜索帮助