Code Monkey home page Code Monkey logo

cloudpress's Issues

Windows下的一些问题

  1. 需要提前安装一下@cloudbase/cli 和 next

$ npm i -g @cloudbase/cli next

  1. 三个脚本都运行失败了,修改了一下兼容Windows下的git操作

"scripts": {
"commit": "git-cz",
"init:db": "node ./bin/init-db",
"login": "sh ./bin/login.sh",
"deploy:frontend": "sh ./bin/deploy-frontend.sh",
"zip:service": "cd service/ && zip service.zip -r ./ -x node_modules/\* dist/\* test/\* && cd -"
},

  1. frontend下运行npm start想本地调试,服务跑不起来

Support process cache

应用场景

  • 耗时长,消耗大的API。例如:根据关键词查询API
  • 不稳定的API
  • 对数据实时性要求不高的API。例如:访客量和浏览量

实现思路

  • 底层使用LRU
  • 框架层使用module进行封装
  • 作用域:针对不同Service,生成独有的缓存实例,防止不同service的缓存键重复冲突

Cloudbase部署

按照文档步骤部署失败,命令不对。我找了官方的部署文档也部署失败了,这个项目应该如何部署?

Init CMS and Cloudpress collections' schema

Fixs

  • 集合名称新增 cloudpress + 数据表版本号: cloudpress-<collectionVersion>-<collectionName>

Features

  • cms数据配置集合 tcb-cms-contents
collectionName<string>
createTime<Date>
updateTime<Date>
label<string>
fields<FiledSchema[]>

FiledSchema:

fieldLabel: string
filedName: string
fileType: string
hidden?: boolean
isRequired: boolean
helpText?: string
  • 文章数据集合 cloudpress-v1-passages

  • 通知数据集合 cloudpress-v1-notices

  • 页面信息集合 cloudpress-v1-infos

  • 网站信息集合 cloudpress-v1-site-infos

Nestjs Server deployed on cloudfunction can't be updated

Fixs

  • 云函数部署Nestjs server后,无法更新

Solutions

  • 方案1:在云函数新架构下的环境中尝试

  • 方案2: 回退策略

    • 创建:cli部署
    • 更新:
      1. cli删除存量函数
      2. cli新建同名
  • 方案3: 容器化部署(Serverless 云应用)

Support api ratelimit

应用场景

对某些耗资源的 API 进行保护

实现思路

  • 基于缓存模块 #20
  • 框架层使用Guard

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.