Giter Club home page Giter Club logo

rx-models's Introduction

Nest Logo

rxModels 是一个低代码后端服务,基于业务模型生成后端,提供通用查询JSON接口

本项目计划重构为GraphQL版,可能不再维护

演示地址:https://rxmodels-client.rxdrag.com/login

安装服务端

#不用下面第一条命令,直接在Github网站上Download一个zip格式的代码包,然后解压也很方便

git clone https://github.com/rxdrag/rx-models.git

cd rx-models

npm install

npm run start:dev

在浏览器输入:http://localhost:3001/ ,看到熟悉的“Hello World!”,则说明已经成功运行了。

服务端使用了Sharp图形处理库来管理图片,这个库不设置代理,可能不容易安装成功,如果在npm install时没有成功,那么按照下面的命令,设置一下代理

npm config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp"

npm config set sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips"

设置完成以后再执行命令

npm install

npm run start:dev

文档

rxModels文档

Stay in touch

License

rxModels is MIT licensed

rx-models's People

Contributors

chris533 avatar codebdy avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rx-models's Issues

后端本地运行项目报 ts 错误,求助

按照 rx-models 文档 流程,运行了之后报错。
node: v16.10.0
pnpm: v7.9.0
@codebdy 大佬求助

DeprecationWarning: 'getMutableClone' has been deprecated since v4.0.0. Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`.
DeprecationWarning: 'createLiteral' has been deprecated since v4.0.0. Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead.
node_modules/.pnpm/@[email protected]/node_modules/@types/eslint/index.d.ts:552:44 - error TS2694: Namespace '"/Users/10005483/Documents/repo/rx-models/node_modules/.pnpm/@[email protected]/node_modules/@types/estree/index"' has no exported member 'PrivateIdentifier'.

552         PrivateIdentifier?: ((node: ESTree.PrivateIdentifier & NodeParentExtension) => void) | undefined;
                                               ~~~~~~~~~~~~~~~~~

node_modules/.pnpm/@[email protected]/node_modules/@types/eslint/index.d.ts:553:51 - error TS2694: Namespace '"/Users/10005483/Documents/repo/rx-models/node_modules/.pnpm/@[email protected]/node_modules/@types/estree/index"' has no exported member 'PrivateIdentifier'.

553         "PrivateIdentifier:exit"?: ((node: ESTree.PrivateIdentifier & NodeParentExtension) => void) | undefined;
                                                      ~~~~~~~~~~~~~~~~~

node_modules/.pnpm/@[email protected]/node_modules/@types/eslint/index.d.ts:558:45 - error TS2694: Namespace '"/Users/10005483/Documents/repo/rx-models/node_modules/.pnpm/@[email protected]/node_modules/@types/estree/index"' has no exported member 'PropertyDefinition'.

558         PropertyDefinition?: ((node: ESTree.PropertyDefinition & NodeParentExtension) => void) | undefined;
                                                ~~~~~~~~~~~~~~~~~~

node_modules/.pnpm/@[email protected]/node_modules/@types/eslint/index.d.ts:559:52 - error TS2694: Namespace '"/Users/10005483/Documents/repo/rx-models/node_modules/.pnpm/@[email protected]/node_modules/@types/estree/index"' has no exported member 'PropertyDefinition'.

559         "PropertyDefinition:exit"?: ((node: ESTree.PropertyDefinition & NodeParentExtension) => void) | undefined;
                                                       ~~~~~~~~~~~~~~~~~~

node_modules/.pnpm/@[email protected]/node_modules/@types/eslint/index.d.ts:568:38 - error TS2694: Namespace '"/Users/10005483/Documents/repo/rx-models/node_modules/.pnpm/@[email protected]/node_modules/@types/estree/index"' has no exported member 'StaticBlock'.

568         StaticBlock?: ((node: ESTree.StaticBlock & NodeParentExtension) => void) | undefined;
                                         ~~~~~~~~~~~

node_modules/.pnpm/@[email protected]/node_modules/@types/eslint/index.d.ts:569:45 - error TS2694: Namespace '"/Users/10005483/Documents/repo/rx-models/node_modules/.pnpm/@[email protected]/node_modules/@types/estree/index"' has no exported member 'StaticBlock'.

569         "StaticBlock:exit"?: ((node: ESTree.StaticBlock & NodeParentExtension) => void) | undefined;
                                                ~~~~~~~~~~~

src/mailer/mailer.clients-pool.ts:2:24 - error TS2307: Cannot find module 'socket.io' or its corresponding type declarations.

2 import { Socket } from 'socket.io';
                         ~~~~~~~~~~~

src/mailer/mailer.gateway.ts:6:32 - error TS2307: Cannot find module 'socket.io' or its corresponding type declarations.

6 import { Socket, Server } from 'socket.io';
                                 ~~~~~~~~~~~

src/rx-event/rx-event.gateway.ts:3:24 - error TS2307: Cannot find module 'socket.io' or its corresponding type declarations.

3 import { Server } from 'socket.io';
                         ~~~~~~~~~~~

[11:11:38 AM] Found 9 errors. Watching for file changes.

降低包之间的耦合

为了降低包之间的耦合,进一步明确关系属于哪个包。如果一个关系不属于这个包,那么就不在代码中导出关联。
这样做的缺点:反向查询不是很方便。
或者把某一端的关联性质定义为null

给包添加一个版本管理功能,并且能够显示包之间的依赖关系

非ID字段作为外键关联

需要解决的问题:
单独存取外键字段,这个比较复杂,等ORM重构定型是处理,现在暂时用fakeRelation指令代替

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.