File tree 3 files changed +20
-2
lines changed
3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import accessKeys from './routes/accessKeys'
9
9
import account from './routes/account'
10
10
import users from './routes/users'
11
11
import apps from './routes/apps'
12
+ import redirects from './routes/redirects'
12
13
import log4js from 'log4js'
13
14
import dotenv from 'dotenv'
14
15
import * as middleware from "./core/middleware"
@@ -76,6 +77,7 @@ if (_.get(config, 'common.storageType') === 'local') {
76
77
}
77
78
78
79
app . use ( '/' , routes ) ;
80
+ app . use ( '/' , redirects ) ;
79
81
app . use ( '/auth' , auth ) ;
80
82
app . use ( '/accessKeys' , middleware . checkToken , accessKeys ) ;
81
83
app . use ( '/account' , middleware . checkToken , account ) ;
Original file line number Diff line number Diff line change @@ -46,8 +46,7 @@ export default {
46
46
*/
47
47
tryLoginTimes : 3 ,
48
48
// CodePush Web(https://github.com/lisong/code-push-web) login address.
49
- // codePushWebUrl: "http://127.0.0.1:3001",
50
- codePushWebUrl : "http://localhost:5000" ,
49
+ codePushWebUrl : "http://localhost:3000" ,
51
50
// create patch updates's number. default value is 3
52
51
diffNums : 3 ,
53
52
// data dir for caclulate diff files. it's optimization.
Original file line number Diff line number Diff line change
1
+
2
+ import config from '~/core/config' ;
3
+ import validationRouter from '~/core/router'
4
+
5
+ const router = validationRouter ( )
6
+
7
+ router . get ( '/login' , ( req , res ) => {
8
+ const codePushWebUrl = config . common . codePushWebUrl
9
+ res . redirect ( `${ codePushWebUrl } /auth/login` ) ;
10
+ } ) ;
11
+
12
+ router . get ( '/register' , ( req , res ) => {
13
+ const codePushWebUrl = config . common . codePushWebUrl
14
+ res . redirect ( `${ codePushWebUrl } /register` ) ;
15
+ } ) ;
16
+
17
+ export default router
You can’t perform that action at this time.
0 commit comments