LeanClub

C++ forum system

  • 所有者: typcn/LeanClub
  • 平台:
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

LeanClub

Build Status

High performance C++ forum system

WARNING: Not recommended for production

DEMO: https://leanclub.org/

Features

  1. Extremely Fast , 20000 RPS on i7 iMac.
  2. Simple and clean frontend.
  3. Full ajax and API.
  4. Google GitHub Twitter OAuth sign in.

Minimum Requirements

  • GCC 4.8
  • CMake 2.8

(Windows is not supported)

Setup

Datebase

  1. Install Apache Couchdb
  2. Create 4 databases named “category” “notification” “topics” and “user”.
  3. Import design docs from “databases” directory.

Environment

  1. apt-get install build-essential cmake libcurl4-nss-dev libboost-all-dev redis-server libhiredis-dev libtcmalloc-minimal4 && sudo ln -s /usr/lib/libtcmalloc_minimal.so.4 /usr/lib/libtcmalloc_minimal.so
  2. Install hiredis from sources ( redis3m is already included )

Config

cp src/config.h.example.h src/config.h
vi src/config.h

Build and run

mkdir Build
cd Build
cmake ..
make
./leanclub

Nginx

server {
    listen 80;
    server_name leanclub.org;
    client_max_body_size MAX_UPLOAD_SIZE;
    root /path/to/leanclub/;

    location / {
        proxy_pass http://127.0.0.1:18080;
        proxy_redirect off;
        proxy_set_header X-Forwarded-For $http_x_forwarded_for;
        proxy_set_header Host leanclub.org;
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Frame-Options DENY;
    }
    	
    # Cache the avatar (Optional) 
    # location /info/ {
    #    proxy_pass http://127.0.0.1:18080;
    #    proxy_redirect off;
    #    proxy_set_header X-Forwarded-For $http_x_forwarded_for;
    #    proxy_set_header Host leanclub.org;
    #    proxy_cache one;
    #    proxy_cache_key "$request_uri";
    #    proxy_cache_valid  200 302  120m;
    # }

    location /static/ {
        expires 10d;
    }
    location /attachments/ {
        expires 365d;
    }
}   

reverse proxy 127.0.0.1:18080 , and map the "static" and "attachments" folder.

About

This program based on: Crow

I’m newbie for c++ , the code may “buggy" , not recommended for production.

License

MIT

主要指標

概覽
名稱與所有者typcn/LeanClub
主編程語言C++
編程語言CMake (語言數: 9)
平台
許可證Other
所有者活动
創建於2015-04-29 08:39:17
推送於2016-01-09 13:49:52
最后一次提交2016-01-09 21:49:52
發布數0
用户参与
星數215
關注者數11
派生數38
提交數53
已啟用問題?
問題數14
打開的問題數7
拉請求數2
打開的拉請求數0
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?