blogils
blogils copied to clipboard
Simple Blog Application uses Sails.js, Angular Js, React Js and MongoDb
Simple Blog Application uses Sails.js, Angular Js, React Js and MongoDb
Screenshots



theme by Dale-Anthony
Demo
Requirements
- Node Js
- Bower (
pip install -g bower) - Sails (
npm install -g sails) - mongodb
Installation
- git clone https://github.com/bahattincinic/blogils blogils
- cd blogils
- npm install
- bower install
- touch config/local.js
Install mongodb:
sudo apt-get install mongodb
# or on mac
sudo brew install mongodb
Start mongodb:
mongod
Edit mongoDb settings (config/local.js)
module.exports = {
port: process.env.PORT || 1337,
environment: process.env.NODE_ENV || 'development',
adapters: {
'default': 'mongo',
mongo: {
module : 'sails-mongo',
host : 'localhost',
port : 27017,
user : '<user>',
password : '<password>',
database : '<db>',
}
},
session: {
adapter: 'mongo',
host: 'localhost',
port: 27017,
db: '<db>',
collection: 'sessions',
username: '<user>',
password: '<password>',
auto_reconnect: false,
ssl: false,
stringify: true
}
};
Manually create user (/user/register will be redirected)
sails console
sails> User.create({username:"<username>", email:"<email>", password:"<password>"}).exec(function(err, user){ console.log(user); });
Personalize your theme
edit to file in the config/bootstrap.js
module.exports.bootstrap = function (cb) {
/* Blogger Settings */
config.blogger = {
name: 'Bahattin Cinic',
subTitle: 'Developer',
email: '[email protected]',
biography: 'Trust yourself! You can do it!',
avatar: 'https://secure.gravatar.com/avatar/c1184fefac22e49bbf59e3775ef6e9dd.png?size=400'
}
config.domain = 'http://localhost:1337/'
/* Seo Settings */
config.seo = {
title: 'Bahattin Cinic',
keyword: 'Developer, Js, Python, PHP, Javascript',
description: 'Trust yourself! You can do it!'
}
/* Disqus Settings */
config.comment = {
is_active: true,
disqus_shortname: 'bahattininic'
}
/* AddThis Share */
config.share = true;
/* Blogger Social Accounts */
config.accounts = [
{
title: 'facebook',
link: 'https://facebook.com/bahattincinic/'
},
{
title: 'twitter',
link: 'https://twitter.com/bahattincinic/'
},
{
title: 'github',
link: 'https://github.com/bahattincinic/',
},
{
title: 'mail',
link: 'mailto:[email protected]'
}
];
// It's very important to trigger this callack method when you are finished
// with the bootstrap! (otherwise your server will never lift, since it's waiting on the bootstrap)
cb();
};
run the following commands:
sails lift
Blog URls
- /admin/
- /user/login/
- /user/logout/
- /post/
:slug/:id/
