配置文件如下:
// # Ghost Configuration
// Setup your Ghost install for various environments
// Documentation can be found at
http://support.ghost.org/config/var path = require('path'),
config;
config = {
// ### Production
// When running Ghost in the wild, use the production environment
// Configure your URL and mail settings here
production: {
url: '
http://localhost',
mail: {},
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'root', //我们暂且用 MySQL 的 root 账户
password : '111111', //输入你的 MySQL 密码
database : 'ghost', //我们前面为 Ghost 创建的数据库名称
charset : 'utf8'
},
debug: false
},
server: {
// Host to be passed to node's `net.Server#listen()`
host: '127.0.0.1',
// Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
port: '2368'
}
},
// ### Development **(default)**
development: {
// The url to use when providing links to the site, E.g. in RSS and email.
// Change this to your Ghost blogs published URL.
url: '
http://localhost:2368',
// Example mail config
// Visit
http://support.ghost.org/mail for instructions
// ```
// mail: {
// transport: 'SMTP',
// options: {
// service: 'Mailgun',
// auth: {
// user: '', // mailgun username
// pass: '' // mailgun password
// }
// }
// },
// ```
database: {
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'root', //我们暂且用 MySQL 的 root 账户
password : '111111', //输入你的 MySQL 密码
database : 'ghost', //我们前面为 Ghost 创建的数据库名称
charset : 'utf8'
},
debug: false
},
server: {
// Host to be passed to node's `net.Server#listen()`
host: '127.0.0.1',
// Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
port: '2368'
},
paths: {
contentPath: path.join(__dirname, '/content/')
}
},
// **Developers only need to edit below here**
// ### Testing
// Used when developing Ghost to run tests and check the health of Ghost
// Uses a different port number
testing: {
url: '
http://127.0.0.1:2369',
database: {
client: 'sqlite3',
connection: {
filename: path.join(__dirname, '/content/data/ghost-test.db')
}
},
server: {
host: '127.0.0.1',
port: '2369'
},
logging: false
},
// ### Testing MySQL
// Used by Travis - Automated testing run through GitHub
'testing-mysql': {
url: '
http://127.0.0.1:2369',
database: {
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'root',
password : '',
database : 'ghost_testing',
charset : 'utf8'
}
},
server: {
host: '127.0.0.1',
port: '2369'
},
logging: false
},
// ### Testing pg
// Used by Travis - Automated testing run through GitHub
'testing-pg': {
url: '
http://127.0.0.1:2369',
database: {
client: 'pg',
connection: {
host : '127.0.0.1',
user : 'postgres',
password : '',
database : 'ghost_testing',
charset : 'utf8'
}
},
server: {
host: '127.0.0.1',
port: '2369'
},
logging: false
}
};
// Export config
module.exports = config;
npm start 后提示
>
[email protected] start /www/web/ghost
> node index
ERROR: Ghost is unable to start due to missing dependencies:
Cannot find module 'bcryptjs'
Cannot find module 'bluebird'
Cannot find module 'body-parser'
Cannot find module 'bookshelf'
Cannot find module 'busboy'
Cannot find module 'cheerio'
Cannot find module 'colors'
Cannot find module 'compression'
Cannot find module 'connect-slashes'
Cannot find module 'downsize'
Cannot find module 'express'
Cannot find module 'express-hbs'
Cannot find module 'fs-extra'
Cannot find module 'html-to-text'
Cannot find module 'knex'
Cannot find module 'lodash'
Cannot find module 'moment'
Cannot find module 'morgan'
Cannot find module 'node-uuid'
Cannot find module 'nodemailer'
Cannot find module 'oauth2orize'
Cannot find module 'passport'
Cannot find module 'passport-http-bearer'
Cannot find module 'passport-oauth2-client-password'
Cannot find module 'request'
Cannot find module 'rss'
Cannot find module 'semver'
Cannot find module 'showdown-ghost'
Cannot find module 'sqlite3'
Cannot find module 'unidecode'
Cannot find module 'validator'
Cannot find module 'xml'
Cannot find module 'qiniu'
Cannot find module 'upyun'
Cannot find module 'aliyun-sdk'
Please run `npm install --production` and try starting Ghost again.
Help and documentation can be found at
http://support.ghost.org.
npm install --production 运行后还是使用SQLite3