1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-09-16 09:41:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Update defaultEndpoint

This commit is contained in:
sunnylqm
2021-01-05 21:53:46 +08:00
parent ecd951265f
commit 56d44b8c85

View File

@@ -3,7 +3,8 @@
*/
const fetch = require('node-fetch');
let host = process.env.PUSHY_REGISTRY || 'https://update.reactnative.cn/api';
const defaultEndpoint = 'http://u.reactnative.cn/api'
let host = process.env.PUSHY_REGISTRY || defaultEndpoint;
const fs = require('fs');
import request from 'request';
import ProgressBar from 'progress';
@@ -59,7 +60,7 @@ exports.closeSession = function() {
savedSession = undefined;
}
session = undefined;
host = process.env.PUSHY_REGISTRY || 'https://update.reactnative.cn/api';
host = process.env.PUSHY_REGISTRY || defaultEndpoint;
};
async function query(url, options) {