Just a blog
-
Clone this repo
git clone https://github.com/rijn/nodecho.git blog
-
Put the following config into
config/prod.conf.js
. The project is using sequelize.js which supportPG
,MySQL
,MsSQL
andSqlite
.const path = require('path'); module.exports = { 'db': { dialect: 'mysql', host: '', port: 3306, username: '', password: '', database: '', pool: { max: 5, min: 0, idle: 10000 }, logging: false, define: { underscored: true } }, 'file': { path: path.join(__dirname, '../files'), mimetype: ['image/gif', 'image/x-png', 'image/pjpeg', 'image/jpg', 'image/jpeg', 'image/png'] } };
-
Install dependencies and build the vendor.
npm i -g grunt grunt-cli npm i grunt build
-
Install
PM2
and start the appnpm i -g pm2 pm2 start ./server --name="blog"
# running dev server
grunt dev
# running api server spec test
grunt mocha