timqian / murmur

🔨WIP🔨 A serverless, customizable comment system

Home Page:https://murmur.moe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A serverless, customizable comment system

Features

  • Serverless & Self-deployable
  • Fully customizable, you decide
    • 💾 Where to store data
    • 💅 How the comments look like
    • ⚡️ How you deploy this service
    • 🔔️ How to get notified

Usage

1. Add murmur style and script to the <head>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/murmur.moe@0/style.css"/>
<script defer src="https://cdn.jsdelivr.net/npm/murmur.moe@0/dist/murmur.umd.js"></script>

2. Add a <div> to the place you want to display comments

<div id="murmur" host="https://api.murmur.moe"></div>

Note: You can change the host to use your owen backend.

Deploy backend

Deploy to tencent cloud

1. Open this repo in codespace or clone it to your computer

2. Add .env file in backend folder

STORE_PLUGIN=s3
STORE_END_POINT=https://cos.ap-hongkong.myqcloud.com
STORE_SECRET_ID=****
STORE_SECRET_KEY=****

## Choose a bucket
STORE_BUCKET=serverless-comment-1303103251
STORE_REGION=ap-hongkong
SERVERLESS_PLATFORM_VENDOR=tencent

3. Add serverless.yml file in backend folder

# serverless.yml
component: http
name: serverless-comment-api
inputs:
  src: ./
  faas:
    runtime: Nodejs12.16
    framework: express
    name: ${name}
  apigw:
    protocols:
      - http
      - https

4. Enter backend dir

cd backend

5. Install serverless framework and Deploy

# Install serverless cli
npm i serverless -g

# Enter backend dir
cd backend

# Install dependencies
npm install --production

# Deploy to tencent scf
serverless deploy
Deploy to AWS(TODO)
Deploy to Vercel(TODO)
Self-deploy

About

🔨WIP🔨 A serverless, customizable comment system

https://murmur.moe


Languages

Language:JavaScript 65.9%Language:CSS 15.7%Language:HTML 14.8%Language:Shell 3.6%