Skip to content

Commit

Permalink
add logo, upd doc
Browse files Browse the repository at this point in the history
  • Loading branch information
SorenEricMent committed Jul 9, 2022
1 parent 484765a commit 99d6342
Show file tree
Hide file tree
Showing 20 changed files with 4,755 additions and 6 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# The Blorum Project
# The Blorum Project - API Server
Languages : [English](https://github.com/SorenEricMent/blorum/blob/main/README.md) [中文](https://github.com/SorenEricMent/blorum/blob/main/README_zh-cn.md)

#### _To combine personal blog with public forum._


## Install prerequisite

## How to install

> git clone https://github.com/SorenEricMent/blorum
> npm install
...Simple like that
17 changes: 17 additions & 0 deletions docs/extension.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Document - extension

Building Blorum Extensions is extremely easy with anyone who know how to code JavaScript. Since you can proxy/replace original blorum functions.

Example of Blorum Extension manifest.json

{
"name": "eg",
"aauthor": “a",
"url": "https://sus.imposter",
"conflict": [],
"require": [],
"before_init": [
"some_js_got_executed_before_blorum_init.js"
],
"after_ready": [],
}
63 changes: 58 additions & 5 deletions docs/site_config.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,102 @@
# Document - config

## True / False flags
##### Example
> {"value" : true}
> {"value" : false}
#### enable_builtin_karma_trust_system

#### enable_builtin_pow_verfication_node_for_register
#### allowed_register

## Varible flags
##### Example
> {"value" : "something"}
> {"value" : {
> "a": 1,
> "test": "a"
> }}
#### site_url

##### default
127.0.0.1


#### site_title
##### default
Yet another Blorum site.

#### site_excerpt
##### default
This is a Blorum site, where you could publish blogs and chat.

#### register_pow_difficuity
#### site_logo
##### default

* Time were based on seconds.
#### user_cookie_expire_after
##### default
2630000

(One month)

#### admin_cookie_expire_after
##### default
1315000

(Half month)

#### mod_cookie_expire_after
##### default
1315000

(Half month)

#### max_user_sessions
##### default
4

#### max_admin_sessions
##### default
1

#### max_mods_sessions
##### default
2


*Rate limits are based on requests per hour.

#### ip_rate_limit_posts
##### default
12

#### ip_rate_limit_register
##### default
1

#### ip_rate_limit_react
##### default
32

#### ip_rate_limit_comment
##### default
60

#### ip_rate_limit_remove
##### default
128

#### ip_rate_limit_articles
##### default
12

#### ip_rate_limit_login
##### default
30

#### ip_rate_limit_bypass_whitelist

##### default
[]

#### user_rate_limit_posts

Expand Down
1 change: 1 addition & 0 deletions main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ async function wrapper() {
console.log("[WRAPPER] Starting Blorum Server (" + utils.version + ")...");
const initializeBlorumServer = (await import("./modules/init.mjs")).initializeBlorumServer;
const initializeRouter = (await import("./modules/router.mjs")).default;
const extensionList = (await import("./modules/extension.mjs"))
const prerequisite = initializeBlorumServer();
prerequisite.promise.then(function (results) {
prerequisite.log("log", "Main", "Blorum pre-initialization finished.");
Expand Down
11 changes: 11 additions & 0 deletions modules/extension.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import "fs";

function getExtensionsList(){

}

function load_beforeInit(){

}

export {getExtensionsList}
4 changes: 4 additions & 0 deletions modules/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,8 @@ function isModuleAvailable(name){
}
}

function SHA512Hash(text){
return crypto.createHash("sha512").update(text).digest("hex");
}

export {version, outputLogs, outputLogsColored, generateNewToken, isModuleAvailable, promisifiedMysqlConnect, promisifiedRedisConnect};
8 changes: 8 additions & 0 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 99d6342

Please sign in to comment.