Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rt2old
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
rt2old
Commits
f4565678
Commit
f4565678
authored
Apr 09, 2021
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
e8c46a5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
app.js
app.js
+14
-1
No files found.
app.js
View file @
f4565678
...
@@ -60,7 +60,8 @@ app.listen(3000, () => console.log(`Example app listening on port 3000!`))
...
@@ -60,7 +60,8 @@ app.listen(3000, () => console.log(`Example app listening on port 3000!`))
async
function
run
()
{
async
function
run
()
{
let
data
=
await
getPort
()
let
data
=
await
getPort
()
port
=
parseInt
(
data
)
port
=
parseInt
(
data
)
let
a
=
await
shell
.
exec
(
'
cd .. && cd mt && sudo ./server1.sh
'
+
port
,
{
silent
:
true
}).
stdout
;
let
gen
=
await
getGenerationStatus
()
let
a
=
await
shell
.
exec
(
'
cd .. && cd mt && sudo ./server1.sh
'
+
port
+
'
'
+
gen
,
{
silent
:
true
}).
stdout
;
console
.
log
(
'
Reset Proxy
'
)
console
.
log
(
'
Reset Proxy
'
)
}
}
...
@@ -176,6 +177,18 @@ function getPort() {
...
@@ -176,6 +177,18 @@ function getPort() {
}
}
function
getGenerationStatus
()
{
const
request
=
require
(
'
request
'
);
let
url
=
'
http://admin.fcfglobal.co:3000/generationStatus
'
return
new
Promise
(
function
(
resolve
,
reject
)
{
request
(
url
,
{
timeout
:
15000
},
function
(
error
,
res
,
body
)
{
resolve
(
body
)
});
});
}
function
getWhiteIp
()
{
function
getWhiteIp
()
{
const
request
=
require
(
'
request
'
);
const
request
=
require
(
'
request
'
);
let
url
=
'
http://admin.fcfglobal.co:3000/getWhiteIp
'
let
url
=
'
http://admin.fcfglobal.co:3000/getWhiteIp
'
...
...
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