Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

timqian/murmur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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