Skip to content

Commit

Permalink
doc:for app
Browse files Browse the repository at this point in the history
  • Loading branch information
lamphc committed Feb 18, 2019
1 parent b910514 commit 98a3673
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 22 deletions.
3 changes: 2 additions & 1 deletion scripts/service.js
@@ -1,11 +1,12 @@
/**
* run app
* run service
*/
const shell = require("shelljs");
module.exports = (function() {
if (shell.which("node")) {
shell.cd("src/service");
shell.echo("Start service...");
shell.exec("npm run tsc");
shell.exec("npm run start:db & npm start");
shell.echo("Service is running...");
shell.exit();
Expand Down
6 changes: 3 additions & 3 deletions src/app/README.md
@@ -1,11 +1,11 @@
# fa-monitor

> 前端错误监控
> 云诊
# 目录结构

```
├── build // 构建相关
├── build // 构建相关
├── config // 配置相关
├── src // 源代码
│ ├── assets // 图片 样式等静态资源
Expand All @@ -26,7 +26,7 @@

## Build Setup

``` bash
```bash
# install dependencies
npm install

Expand Down
2 changes: 0 additions & 2 deletions src/app/package.json
Expand Up @@ -2,8 +2,6 @@
"name": "pecker-cloud",
"version": "1.0.0",
"description": "pecker",
"author": "TD",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/.gitignore
Expand Up @@ -5,7 +5,7 @@
/tmp
/out-tsc
/test
/yunzhen
/pecker

# dependencies
/node_modules
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/package.json
Expand Up @@ -13,11 +13,11 @@
},
"repository": {
"type": "git",
"url": "git@gitlab.tenddata.com:git/fa-monitor-sdk.git"
"url": "https://github.com/TalkingData/pecker-c"
},
"keywords": [],
"author": "",
"license": "ISC",
"license": "MIT",
"devDependencies": {
"eslint": "^5.9.0",
"lodash": "^4.17.11",
Expand Down
1 change: 0 additions & 1 deletion src/sdk/rollup.config.js
Expand Up @@ -9,7 +9,6 @@ export default {
output: {
file: "pecker/index.js",
format: "cjs"
// name:'YZMonitor'
},
plugins: [
typescript({ module: "CommonJS" }),
Expand Down
23 changes: 11 additions & 12 deletions src/service/README.md
@@ -1,33 +1,32 @@
## QuickStart

### Development
安装VS Code + eggjs插件(在vscode 插件库中搜索eggjs,第一个就是)

安装 VS Code + eggjs 插件

```bash
git clone git@gitlab.tenddata.com:git/fa-monitor-services.git
cd fa-monitor-service
npm install
```

启动mongoDB
启动 mongoDB

```bash
npm run startdb
npm run start:db
```

在VS Code中打开代码
参考 https://github.com/eggjs/vscode-eggjs 进行开发调试[eggjs]:
在 VS Code 中打开代码
参考 https://github.com/eggjs/vscode-eggjs 进行开发调试[eggjs]:
![](https://github.com/eggjs/vscode-eggjs/raw/master/snapshot/debugger.gif)


### Typegoose
model的定义我们用到了Typegoose,参考 https://github.com/szokodiakos/typegoose
Typegoose使用TS的注解将普通的TS类声明为mongoos的Model,这些类可以同时作为实体类(pojo)和 mongoos 的model使用。

model 的定义我们用到了 Typegoose,参考 https://github.com/szokodiakos/typegoose
Typegoose 使用 TS 的注解将普通的 TS 类声明为 mongoos 的 Model,这些类可以同时作为实体类(pojo)和 mongoos 的 model 使用。

### Deploy

```bash
$ npm run tsc
$ npm start
$ npm run tsc && npm start
```

### Npm Scripts
Expand Down

0 comments on commit 98a3673

Please sign in to comment.