Skip to content

Commit

Permalink
feat: add websocket function
Browse files Browse the repository at this point in the history
  • Loading branch information
liuguanglei committed Apr 10, 2023
1 parent ce0a0a6 commit f49deed
Show file tree
Hide file tree
Showing 115 changed files with 6,101 additions and 6,905 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export const OSS_Config = {

在根目录的config文件夹中的server文件中

**http**

```js
const RD_BaseURL = {
development: '开发环境地址',
Expand All @@ -44,6 +46,16 @@ export const OSS_Config = {
};
```

**websocket**

```js
const RD_websocketUrl = {
development: '开发环境地址',
test: '测试环境地址',
production: '线上环境地址'
};
```

## 技术栈

- react, 基于react 17.0.2 版本进行开发
Expand Down
Empty file removed config/client.js
Empty file.
18 changes: 14 additions & 4 deletions config/server.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
// 后端接口地址
// 后端http接口地址
export const RD_BaseURL = {
development: 'your development BE url',
test: 'your test BE url',
production: 'your production BE url',
development: '开发环境地址',
test: '测试环境地址',
production: '线上环境地址',
};


// 后端websocke地址
export const RD_websocketUrl = {
development: '开发环境地址',
test: '测试环境地址',
production: '线上环境地址'
};


// 后端文件存储地址
export const RD_FileURL = 'http://localhost:20004';



export const RD_BASE_URL = RD_BaseURL[NODE_ENV];
export const RD_WEBSOCKET_URL = RD_websocketUrl[NODE_ENV];


export default {
Expand Down
82 changes: 48 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "runnergo-fe",
"name": "kunpeng-fe",
"version": "1.0.0",
"description": "",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const devConfig = {
}
},
}
}
},
},
devtool: 'eval-source-map',
plugins: [
Expand Down
Loading

0 comments on commit f49deed

Please sign in to comment.