Simple Blog Application uses Sails.js, Angular Js, React Js and MongoDb
theme by Dale-Anthony
- Node Js
- Bower (
pip install -g bower) - Sails (
npm install -g sails) - mongodb
- git clone https://github.com/bahattincinic/blogils blogils
- cd blogils
- npm install
- bower install
- touch config/local.js
sudo apt-get install mongodb
# or on mac
sudo brew install mongodb
mongod
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
}
};
sails console
sails> User.create({username:"<username>", email:"<email>", password:"<password>"}).exec(function(err, user){ console.log(user); });
edit to file in the config/bootstrap.js
module.exports.bootstrap = function (cb) {
/* Blogger Settings */
config.blogger = {
name: 'Bahattin Cinic',
subTitle: 'Developer',
email: 'bahattincinic@gmail.com',
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:bahattincinic@gmail.com'
}
];
// 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();
};
sails lift
- /admin/
- /user/login/
- /user/logout/
- /post/
:slug/:id/



