Giter Site home page Giter Site logo

hopgoldy / cube-diary Goto Github PK

View Code? Open in Web Editor NEW
49.0 1.0 10.0 633 KB

一个简单扁平的桌面 / 移动端日记本。

License: GNU General Public License v3.0

TypeScript 93.94% JavaScript 1.75% HTML 0.21% CSS 4.00% Dockerfile 0.09%
diary-app nextjs self-hosted

cube-diary's Introduction

cube-diary

一个简单扁平的桌面 / 移动端记事本。基于 react / koa2 / sqlite / typescript / antd。

查看桌面端截图 登录 日记列表 日记编辑 搜索
查看移动端截图
移动端登录 移动端日记列表 移动端日记编辑 移动端搜索

特性

  • 🚫 无广告、无收费、完全开源,自己的数据自己掌握
  • 🚀 极其简单的部署,仅需两行命令
  • 🧩 自定义 JSON 导入导出
  • 📝 支持 MarkDown 语法,支持实时预览、自动保存、颜色标记
  • 🔗 支持笔记内图片、文件上传
  • 📱 桌面端 / 移动端全站响应式设计
  • 🎯 支持关键字搜索
  • 🤖 支持多用户使用
  • 🌙 黑夜模式

部署

1. docker 安装(推荐)

cube-diary 不需要 docker compose,单容器即可运行:

docker run -d -p 3700:3700 -v ~/cube-diary-storage:/app hopgoldy/cube-diary:1.0.4

执行后数据将会存放在 ~/cube-diary-storage 目录。

2. npm 安装

cube-diary 在开发时就以简单部署为目标,不需要配置数据库,不需要安装任何软件。仅需 node(16+)环境即可运行。

# 安装项目
# linux 下安装失败时请尝试 sudo 并在安装命令后追加 --unsafe-perm=true --allow-root 参数
npm install -g cube-diary

# 启动项目
cube-diary run

项目启动后将会在当前目录下生成 config.json,可以通过修改该文件来对应用进行简单的自定义。

服务将默认开启在端口 3700 上,可以通过 cube-diary run --port=3701 修改端口。

使用 -h 参数查看更多配置

数据迁移

所有数据均默认保存在应用目录下的 .storage 文件夹里,所以直接将其打包然后复制到其他地方即可。

贡献

本项目系本人自用开发,如果你觉得有些功能不够完善,欢迎 PR / issue。

许可

本项目源码基于 GPL v3 许可开源,点此 查看更多信息。

cube-diary's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cube-diary's Issues

一个示例的 `docker-compose.yaml` 文件

version: '3'
services:
  cube-diary:
    image: node:slim
    container_name: cube-diary
    ports:
      - 3700:3700
    volumes:
      - .:/app
    working_dir: /app
    command: >
      sh -c "cd /app &&
             npm install -g cube-diary &&
             cube-diary run"

放到任意目录之后, 执行 sudo docker compose up -d 即可启动。

成功启动之后的目录是这样的:

.
├── config.json
├── docker-compose.yaml
└── .storage
    ├── cube-diary.db
    ├── dbVersion
    ├── jwtSecret
    └── replayAttackSecret

1 directory, 6 files

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.