Giter Club home page Giter Club logo

rap2-delos's Introduction

RAP2-DELOS 开源社区版本 (后端 API 服务器)

阿里妈妈 THX 团队新项目 GoGoCode:https://github.com/thx/gogocode 给批量修改项目代码减轻痛苦!

RAP2 是在 RAP1 基础上重做的新项目,它能给你提供方便的接口文档管理、Mock、导出等功能,包含两个组件(对应两个 Github Repository)。

  • rap2-delos: 后端数据 API 服务器,基于 Koa + MySQLlink
  • rap2-dolores: 前端静态资源,基于 React link

Rap 官方服务站点,无需安装直接体验: rap2.taobao.org

Rap 官方服务站点(rap2.taobao.org)系统维护完成相关编辑功能已恢复使用

注意:本工具为开发工具,相关API未做任何XSS等安全验证,请勿在生产环境依赖RAP的任何服务!!!

有急事来官方钉钉群,响应更迅速: 31626736 (二群,一群已满)

2019-10-31:现已支持 Docker 一键部署,欢迎大家体验&反馈

2019-09-27:更新的用户请注意按照下面指引安装 pandoc 以启用文档导出功能

推荐使用 Docker 快速部署

安装 Docker

国内用户可参考 https://get.daocloud.io/ 安装 Docker 以及 Docker Compose (Linux 用户需要单独安装),建议按照链接指引配置 Docker Hub 的国内镜像提高加载速度。

配置项目

在任意地方建立目录 rap

把本仓库中的 docker-compose.yml 放到 rap 目录中

Rap 前端服务的端口号默认为 3000,你可以在 docker-compose.yml 中按照注释自定义

在 rap 目录下执行下面的命令:

# 拉取镜像并启动
docker-compose up -d

# 启动后,第一次运行需要手动初始化mysql数据库
# ⚠️注意: 只有第一次该这样做
docker-compose exec delos node scripts/init

# 部署成功后 访问
http://localhost:3000 # 前端(可自定义端口号)
http://localhost:38080 # 后端

# 如果访问不了可能是数据库没有链接上,关闭 rap 服务
docker-compose down
# 再重新运行
docker-compose up -d
# 如果 Sequelize 报错可能是数据库表发生了变化,运行下面命令同步
docker-compose exec delos node scripts/updateSchema

⚠️注意:第一次运行后 rap 目录下会被自动创建一个 docker 目录,里面存有 rap 的数据库数据,可千万不要删除。

镜像升级

Rap 经常会进行 bugfix 和功能升级,用 Docker 可以很方便地跟随主项目升级

# 拉取一下最新的镜像
docker-compose pull
# 暂停当前应用
docker-compose down
# 重新构建并启动
docker-compose up -d --build
# 有时表结构会发生变化,执行下面命令同步
docker-compose exec delos node scripts/updateSchema
# 清空不被使用的虚悬镜像
docker image prune -f

手动部署

环境要求

  • Node.js 8.9.4+
  • MySQL 5.7+
  • Redis 4.0+
  • pandoc 2.73 (供文档生成使用)

开发模式

安装 MySQL 和 Redis 服务器

请自行查找搭建方法,mysql/redis 配置在 config.*.ts 文件中,在不修改任何配置的情况下, redis 会通过默认端口 + 本机即可正常访问,确保 redis-server 打开即可。

注意:修改 cofig 文件后需要重新 npm run build 才能生效

安装 pandoc

我们使用 pandoc 来生成 Rap 的离线文档,安装 Pandoc 最通用的办法是在 pandoc 的 release 页面下载对应平台的二进制文件安装即可。

其中 linux 版本最好放在/usr/local/bin/pandoc 让终端能直接找到,并执行 chmod +x /usr/local/bin/pandoc 给调用权限。

测试在命令行执行命令 pandoc -h 有响应即可。

启动redis-server

redis-server

后台执行可以使用 nohup 或 pm2,这里推荐使用 pm2,下面命令会安装 pm2,并通过 pm2 来启动 redis 缓存服务

npm install -g pm2
npm run start:redis

先创建创建数据库

mysql -e 'CREATE DATABASE IF NOT EXISTS RAP2_DELOS_APP DEFAULT CHARSET utf8 COLLATE utf8_general_ci'

初始化

npm install

confirm configurations in /config/config.dev.js (used in development mode),确认/config/config.dev.js 中的配置(.dev.js 后缀表示用于开发模式)。

安装 && TypeScript 编译

npm install -g typescript
npm run build

初始化数据库表

npm run create-db

执行 mocha 测试用例和 js 代码规范检查

npm run check

启动开发模式的服务器 监视并在发生代码变更时自动重启

npm run dev

生产模式

# 1. 修改/config/config.prod.js中的服务器配置
# 2. 启动生产模式服务器
npm start

社区贡献

Author

Tech Arch

  • 前端架构(rap2-dolores)
    • React / Redux / Saga / Router
    • Mock.js
    • SASS / Bootstrap 4 beta
    • server: nginx
  • 后端架构(rap2-delos)
    • Koa
    • Sequelize
    • MySQL
    • Server
    • server: node

旧版本升级

-数据库数据迁移  RAP2 2.4迁移到2.8
  由于数据库表有主外键,按以下顺序插入数据
  1.Users
  2.Organizations
  3.Repositories
  4.repositories_members(备注:将createdAt、updatedAt两个字段必填去除)
  5.organizations_members
  6.Modules
  7.Interfaces
  8.Loggers
  9.Properties(备注:将数据scope字段的所有''值替换成'String')
  default_val和repositories_collaborators表无数据无需处理

rap2-delos's People

Contributors

5aaee9 avatar atarismio avatar bosn avatar charmfocus avatar codefine avatar feizhaojun avatar fukaiyu avatar ganl avatar hanreew avatar irvingzhao avatar lkqm avatar llitfkitfk avatar mitscherlich avatar paul-wiz avatar sea13502 avatar shangwenhe avatar stpice avatar topcatv avatar youngjuning avatar zhcsyncer 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  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  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  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

rap2-delos's Issues

npm run check时报错,请指教,谢谢

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] check: npm run linter && test
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] check script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-11-30T12_01_13_291Z-debug.log

以下是/root/.npm/_logs/2017-11-30T12_01_13_291Z-debug.log日志文件记录

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/nodejs9/bin/node',
1 verbose cli '/usr/local/nodejs9/bin/npm',
1 verbose cli 'run',
1 verbose cli 'check' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'precheck', 'check', 'postcheck' ]
5 info lifecycle [email protected]precheck: [email protected]
6 info lifecycle [email protected]
check: [email protected]
7 verbose lifecycle [email protected]check: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
check: PATH: /usr/local/nodejs9/lib/node_modules/npm/bin/node-gyp-bin:/usr/local/rap2/node_modules/.bin:/usr/local/nodejs9/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
9 verbose lifecycle [email protected]check: CWD: /usr/local/rap2
10 silly lifecycle [email protected]
check: Args: [ '-c', 'npm run linter && test' ]
11 silly lifecycle [email protected]check: Returned: code: 1 signal: null
12 info lifecycle [email protected]
check: Failed to exec check script
13 verbose stack Error: [email protected] check: npm run linter && test
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/local/nodejs9/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack at EventEmitter.emit (events.js:159:13)
13 verbose stack at ChildProcess. (/usr/local/nodejs9/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:159:13)
13 verbose stack at maybeClose (internal/child_process.js:943:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid [email protected]
15 verbose cwd /usr/local/rap2
16 verbose Linux 3.10.0-693.5.2.el7.x86_64
17 verbose argv "/usr/local/nodejs9/bin/node" "/usr/local/nodejs9/bin/npm" "run" "check"
18 verbose node v9.2.0
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] check: npm run linter && test
22 error Exit status 1
23 error Failed at the [email protected] check script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

数据库相关问题:缺少字段、事务等

  1. 默认情况下npm run create-db使用的是哪个数据库配置:dev or prod?配置好prod之后,执行无反应;
  2. 此文件提供的DDL语句缺少字段:
    rap2-delos/scripts/rap2_delos.sql
    table interfacespriorityproperties:缺少priority字段
    table loggers缺少creatorId字段
  3. 比较严重的一个问题是,没有增加事务控制
    请核实

restful 接口参数类型支持

现在不能区别资源传值的不同

比如 PUT {{host}}:{{port}}/post/:org_id/info/:increment_id?order_type=all

环境变量、url参数、问号传参以及body传值都无法区分,希望未来能够加入这些区分功能

npm run create-db 报错

rap2-delos\scripts\init\index.js

async function main () {
^^^^^^^^
SyntaxError: Unexpected token function
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:393:7)
at startup (bootstrap_node.js:150:9)

仓库权限疑问

最近为公司部署了一套,试用了几天,有几个小问题

  1. 仓库没有找到public 权限,必须为每个人分配一次权限,比较麻烦。希望增加权限选择。
  2. 团队所属仓库,添加成员后,成员无法在 仓库 菜单直接看到该仓库,需进入团队菜单,然后从团队菜单才能发现该仓库。 (不知道是bug还是需求)
  3. 项目中跳转页面全部使用的是 进行路由跳转,请问如何为所有的路由统一添加一个跟路径 比如: 127.0.0.1:8080/repository 替换为 127.0.0.1:8080/xx/repository

npm run dev报错

在上一个问题未解决的情况下,我直接执行了
npm run dev
但报如下错误:
Error: listen EADDRINUSE :::8080
at Object._errnoException (util.js:1031:13)
at _exceptionWithHostPort (util.js:1052:20)
at Server.setupListenHandle [as _listen2] (net.js:1367:14)
at listenInCluster (net.js:1408:12)
at Server.listen (net.js:1496:7)
at Application.listen (/usr/local/rap2/node_modules/koa/lib/application.js:64:19)
at start (/usr/local/rap2/scripts/dev.js:8:7)
at Object. (/usr/local/rap2/scripts/dev.js:19:1)
at Module._compile (module.js:641:30)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Function.Module.runMain (module.js:682:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
[nodemon] app crashed - waiting for file changes before starting...

看上去是和端口有关,但我在config.dev.js config.local.js config.prod.js 文件里的port都已经改成别的端口了。

run dev 时报错

前面步骤正常, npm run check 也无报错

开发环境:
系统: win7 x64;
node: 8.9.0
npm: 5.5.1

报错日志:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle [email protected]predev: [email protected]
6 info lifecycle [email protected]
dev: [email protected]
7 verbose lifecycle [email protected]dev: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
dev: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\rap2\node_modules.bin;C:\Users\53KF\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\53KF\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Users\53KF\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle [email protected]dev: CWD: C:\rap2
10 silly lifecycle [email protected]
dev: Args: [ '/d /s /c',
10 silly lifecycle 'NODE_ENV=development nodemon --watch scripts --watch src scripts/dev.js' ]
11 silly lifecycle [email protected]dev: Returned: code: 1 signal: null
12 info lifecycle [email protected]
dev: Failed to exec dev script
13 verbose stack Error: [email protected] dev: NODE_ENV=development nodemon --watch scripts --watch src scripts/dev.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\rap2
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
18 verbose node v8.9.0
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] dev: NODE_ENV=development nodemon --watch scripts --watch src scripts/dev.js
22 error Exit status 1
23 error Failed at the [email protected] dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

编辑时需要锁定文档,锁定文档要在单个tab上,不能是项目或仓库。

在0.14版本的时候,文档会提示被锁定。这个功能非常好。锁定的范围不最好能锁定到tab页的级别,不要锁定到整个项目。
多个人同时编辑接口文档时,在0.14版本的时候通过项目来切分,避免冲突,但是查看接口文档时非常不方便。如果在0.14的基础上,锁定文档能只锁定到tab,使用起来会非常方便。

会增加对外部模拟请求吗?

会增加对外部模拟请求吗?
完成接口开发后,想用rap生成的请求参数,去调用实际地址!这部分功能会增加吗?

是否有接口版本管理?

Rap1的版本管理很好用。用处也非常 大,但在rap2中没有看到,请问这一块有对应 的开发计划 吗?

按描述,走开发模式部署,有些小问题

初始化之后,运行npm run create-db
脚本并不是根据【/config/config.dev.js】里的配置来运行,而是【/config/config.prod.js】。

如果【/config/config.prod.js】里没有配上生产环境的数据库信息,直接报错如下:
Unable to connect to the database: { SequelizeAccessDeniedError: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: NO) at Handshake._callback (/Users/coding/rap2/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:83:20) at Handshake.Sequence.end (/Users/coding/rap2/node_modules/mysql/lib/protocol/sequences/Sequence.js:88:24) at Handshake.ErrorPacket (/Users/coding/rap2/node_modules/mysql/lib/protocol/sequences/Handshake.js:132:8) at Protocol._parsePacket (/Users/coding/rap2/node_modules/mysql/lib/protocol/Protocol.js:279:23) at Parser.write (/Users/coding/rap2/node_modules/mysql/lib/protocol/Parser.js:76:12) at Protocol.write (/Users/coding/rap2/node_modules/mysql/lib/protocol/Protocol.js:39:16) at Socket.<anonymous> (/Users/coding/rap2/node_modules/mysql/lib/Connection.js:103:28) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Socket.Readable.push (_stream_readable.js:208:10) at TCP.onread (net.js:594:20) name: 'SequelizeAccessDeniedError', message: 'ER_ACCESS_DENIED_ERROR: Access denied for user \'root\'@\'localhost\' (using password: NO)',

不是很懂node,不知道在哪里可以把这个依赖配置改成对应环境的文件,部署描述也没有细说。

仓库点击“插件” ,出现乱码

在仓库 上方点击“插件” 按钮,跳转到新页面会出现乱码。 当前系统版本macOS 10.13.2 (17C88)
浏览器:Safari, 版本 11.0.2 (13604.4.7.1.3)、chrome ,版本 63.0.3239.84(正式版本) (64 位)
均出现上述问题。

image

image

要保留0.14版本的路由功能

要保留0.14版本的路由功能,看到2版本有这个功能,最好是保留下来。我们的接口通过代理配置,没有路由会增加很多的配置项,代码实现起来也不难。

关于新建模块建议

模块的定义,相当于是对接口的一个分组管理;那么可不可以添加一个父模块的概念,设计成无限目录分级,提供对模块本身的管理呢?
现在是:项目-模块-接口
修改后是:项目-父父模块-父模块-...-模块-接口
这样还可以避免模块过多的时候,模块标签挤到下一行?
一个项目作为一个系统,如果模块特别多,模块不分组,管理起来就比较麻烦了。

布署手册能写得详细些吗。现在布署有问题

npm run create-db时报下面的错误。
请指教
` [email protected] create-db /usr/local/rap2

node scripts/init

/usr/local/rap2/scripts/init/index.js:5
async function main () {
^^^^^^^^

SyntaxError: Unexpected token function
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)

npm ERR! Linux 3.10.0-123.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "create-db"
npm ERR! node v6.12.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] create-db: node scripts/init
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] create-db script 'node scripts/init'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the rap2-delos package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/init
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs rap2-delos
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls rap2-delos
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/rap2/npm-debug.log
`

开发计划疑问

希望进行一下开发计划:
1、不同层级的内容有分颜色显示,类似RAP1的样式;
2、变量含义和备注是否会恢复?现在仅存字段简介可能不是很够用。
3、是否会新增字段是否是必填的选项。
4、模块层级是否会恢复和RAP1一致,可分2级?
5、字段类型是否能和生成规则区分开,主要是:function、regexp

rapV0.14.16 头部会出现广告

rapV0.14.16 头部会出现广告(阿里云的),找了一圈没找到写的地方,是流量劫持吗?在哪可以修改?

install 遇到错误

  1. install

node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v51-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v51 ABI, unknown) (falling back to source compile with node-gyp)
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
COPY /Users/shuxian/Projects/git/git-tools/alibaba-rap/node_modules/fsevents/lib/binding/Release/node-v51-darwin-x64/fse.node
TOUCH Release/obj.target/action_after_build.stamp

[email protected] install /Users/shuxian/Projects/git/git-tools/alibaba-rap/node_modules/pre-commit
node install.js

pre-commit:
pre-commit: Detected an existing git pre-commit hook
pre-commit: Old pre-commit hook backuped to pre-commit.old
pre-commit:

  1. run check

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] check: npm run linter && test
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] check script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

  1. 错误日志
    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/local/Cellar/node/7.9.0/bin/node',
    1 verbose cli '/usr/local/bin/npm',
    1 verbose cli 'run',
    1 verbose cli 'check' ]
    2 info using [email protected]
    3 info using [email protected]
    4 verbose run-script [ 'precheck', 'check', 'postcheck' ]
    5 info lifecycle [email protected]precheck: [email protected]
    6 info lifecycle [email protected]
    check: [email protected]
    7 verbose lifecycle [email protected]check: unsafe-perm in lifecycle true
    8 verbose lifecycle [email protected]
    check: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users//Projects/git/git-tools/alibaba-rap/node_modules/.bin:/Users//opt/apache-maven/3.5.0/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin:/Library/gradle/gradle-3.5/bin:/Users//workspace/go/bin:/Users//Library/Android/sdk/tools:/Users//Library/Android/sdk/platform-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
    9 verbose lifecycle [email protected]check: CWD: /Users/Projects/git/git-tools/alibaba-rap
    10 silly lifecycle [email protected]
    check: Args: [ '-c', 'npm run linter && test' ]
    11 silly lifecycle [email protected]check: Returned: code: 1 signal: null
    12 info lifecycle [email protected]
    check: Failed to exec check script
    13 verbose stack Error: [email protected] check: npm run linter && test
    13 verbose stack Exit status 1
    13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
    13 verbose stack at emitTwo (events.js:106:13)
    13 verbose stack at EventEmitter.emit (events.js:194:7)
    13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
    13 verbose stack at emitTwo (events.js:106:13)
    13 verbose stack at ChildProcess.emit (events.js:194:7)
    13 verbose stack at maybeClose (internal/child_process.js:899:16)
    13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
    14 verbose pkgid [email protected]
    15 verbose cwd /Users/Projects/git/git-tools/alibaba-rap
    16 verbose Darwin 17.2.0
    17 verbose argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "run" "check"
    18 verbose node v7.9.0
    19 verbose npm v5.5.1
    20 error code ELIFECYCLE
    21 error errno 1
    22 error [email protected] check: npm run linter && test
    22 error Exit status 1
    23 error Failed at the [email protected] check script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    24 verbose exit [ 1, true ]

  2. 运行后打开8080
    image

我今天登陆自己的账号显示的却是别人的名称和信息

今天下午由于长时间没有操作,操作的时候跳转到登陆页面,登陆成功后显示的却是chenchuanwen的账号信息,看到的也是他的厂库和内容,本人在他的厂库里面新建了一条消息做为提醒,没有删除任何内容,但是这样的情况出现时非常危险的,为什么我登陆自己的账号却跳转到别人的里面?

怎样在linux后台运行?

我使用nohup执行npm start,会话界面退出后,就会关闭,请问需要怎么样执行?
nohup npm start >nohup.out 2>&1 &

数据库出错问题

1、user表运行初始化数据后缺少empId字段
2、route/analytics.js,中由于1的问题,有个select user.empId报错,同时这个文件里,updatedAt,请统一下,强迫症患者,不要select中 前面At,后面at,数据库的字段时updatedAt

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.