Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
e5cd8253
Commit
e5cd8253
authored
Sep 14, 2017
by
nikogu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加禁用 proxy 的 start
parent
5e0d8684
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
.roadhogrc.mock.js
.roadhogrc.mock.js
+4
-2
package.json
package.json
+1
-0
No files found.
.roadhogrc.mock.js
View file @
e5cd8253
...
@@ -8,8 +8,10 @@ import { getProfileAdvancedData } from './mock/profile';
...
@@ -8,8 +8,10 @@ import { getProfileAdvancedData } from './mock/profile';
import
{
getNotices
}
from
'
./mock/notices
'
;
import
{
getNotices
}
from
'
./mock/notices
'
;
import
{
format
,
delay
}
from
'
roadhog-api-doc
'
;
import
{
format
,
delay
}
from
'
roadhog-api-doc
'
;
// 代码中会兼容本地 service mock 以及部署站点的静态数据
// 是否禁用代理
const
noProxy
=
process
.
env
.
NO_PROXY
===
'
true
'
;
// 代码中会兼容本地 service mock 以及部署站点的静态数据
const
proxy
=
{
const
proxy
=
{
// 支持值为 Object 和 Array
// 支持值为 Object 和 Array
'
GET /api/currentUser
'
:
{
'
GET /api/currentUser
'
:
{
...
@@ -79,4 +81,4 @@ const proxy = {
...
@@ -79,4 +81,4 @@ const proxy = {
'
GET /api/notices
'
:
getNotices
,
'
GET /api/notices
'
:
getNotices
,
};
};
export
default
delay
(
proxy
,
1000
);
export
default
noProxy
?
{}
:
delay
(
proxy
,
1000
);
package.json
View file @
e5cd8253
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
"scripts"
:
{
"scripts"
:
{
"precommit"
:
"npm run lint"
,
"precommit"
:
"npm run lint"
,
"start"
:
"roadhog server"
,
"start"
:
"roadhog server"
,
"start:no-proxy"
:
"NO_PROXY=true roadhog server"
,
"build"
:
"roadhog build"
,
"build"
:
"roadhog build"
,
"site"
:
"roadhog-api-doc static"
,
"site"
:
"roadhog-api-doc static"
,
"lint:style"
:
"stylelint
\"
src/**/*.less
\"
--syntax less"
,
"lint:style"
:
"stylelint
\"
src/**/*.less
\"
--syntax less"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment