Giter VIP home page Giter VIP logo

apijson-node's Introduction

ApiJson Node版

A ApiJson Server build with Nest.js and TypeORM


启动项目

1.安装依赖

$ npm install

国内安装不上可以使用cnpm

2.启动项目

$ npm run dev # 开发

$ npm run start # 正式
  1. 默认端口9771 打开 http://localhost:9771/

默认账号 admin/admin

4.测试接口

curl --location --request POST 'localhost:9771/api/get?app-sign=local-admin' \
--header 'Content-Type: application/json' \
--data-raw '{
    "list[]": {
    	"LocalUser": {}
    }
}'

app-sign也可放在header里

curl --location --request POST 'localhost:9771/api/get' \
--header 'Content-Type: application/json' \
--header 'app-sign: local-admin' \
--data-raw '{
    "list[]": {
    	"LocalUser": {}
    }
}'

因为设置了校验中间件 随机返回403

正常返回结果如下

5.配置其他数据库

  • 权限管理>数据库管理>添加数据库

  • 测试连接

  • 添加表

  • 点击 写入配置

6.配置表权限

  • 权限管理>表管理>配置表权限角色

  • 部署所有表配置

  • 热重启 (热重启是针对pm2启动的,如果是npm run dev启动的可自行重启)

7.配置角色

  • 角色包含的是上述中的表的权限的集合

8.配置应用

  • 应用管理>新增应用

  • 应用可以配置多个角色,自定义逻辑

9.其他文档, 请点击文档

10.数据统计可点击左上角APIJSON,统计最近7天数据

apijson-node's People

Contributors

dependabot[bot] avatar kevinaskin avatar

Watchers

 avatar

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.