Giter Site home page Giter Site logo

soblog's Introduction

soBlog

A simple blog built by node.js , express4 and mongodb. Live demo : lingyong.me

Getting Started

Before you start in soBlog, you should install node.js and mongodb.

After that you should pull the code to local.

Do that :

npm install

or

sudo npm install

And then, edit the settings.example.js to settings.js.

(function() {
  module.exports = {
    cookieParser: '',    
    cookieSecret: '',
    db: 'qorablog',        //mongodb db_name
    host: 'localhost',
    root: __dirname,      
    QnClient: {            //Using qiuniu to store images.
      accessKey: '',             
      secretKey: '',
      bucket: '',
      domain: ''
    },
    perPageBlogSize: 10,   //In bloglist view, how many blogs can be shown.
    googleAuthKey: '',    //When you login blog, there will have a googleAuth, this is the googleAuthKey.
    loginPwd: '',         //Passwd to login.
    loginUserName: '',    //UserName to login.
    titles: {
      blog_bloglist: "Blog · QORA BLOG · Innovative From The Core",
      blog_perBlog: "QORA BLOG · Innovative From The Core",
      blog_post: "POST BLOG · Innovative From The Core",
      blog_view: "View · QORA BLOG · Innovative From The Core",
      blog_edit: "Edit · QORA BLOG · Innovative From The Core",
      cover: "Cover · QORA BLOG · Innovative From The Core",
      eachCover: "QORA BLOG · Innovative From The Core",
      postCover: "Post Cover · QORA BLOG · Innovative From The Core",
      editCover: "Edit Cover · QORA BLOG · Innovative From The Core",
      index: "QORA BLOG · Innovative From The Core",
      about: "QORA · Innovative From The Core",
      manage: "manage · QORA BLOG · Innovative From The Core",
      login: "login · QORA BLOG · Innovative From The Core",
      tags: "Tag · QORA BLOG · Innovative From The Core",
      eachTag: "QORA BLOG · Innovative From The Core"
    }
  };

}).call(this);

Remark

soBlog use qiniu to store images, so before you can use soBlog you should register a account in qiniu.com.

You also need edit the googleAuthKey, for example:

googleAuthKey: 'This_is_a_demoe_authkey'

After you start the soBlog in node app.js,you will see things like that:

express-session deprecated undefined saveUninitialized option; provide saveUninitialized option config/express.js:67:13
key for googleAuth app: KRUGS427NFZV6YK7MRSW233FL5QXK5DINNSXS===
Express server listening on port 3000
connected

You should copy the key for googleAuth app to your googleAuth app.

Watch out

OK, soBlog just a demo, not a product, so, if you want to use it to build your own blog, you must be careful.

It is built in express4, jade, mongoose, bootstrap. It may do some help for a node.js beginner.

Before you can use soBlog, you should create a upload_tmp in root dir.

Screenshot

screenshot

screenshot

screenshot

Host

About host, I use DigitalOcean, my blog lingyong.me is hosted in DigitalOcean.

soblog's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.