Commit ca7e814a authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent a48b8e55
......@@ -3,6 +3,8 @@ const app = express()
const port = 3000
const shell=require('shelljs')
startup()
app.get('/', (req, res) =>
{
res.send('Hello World!')
......@@ -12,7 +14,14 @@ app.get('/', (req, res) =>
app.listen(port, () => console.log(`Example app listening on port ${port}!`))
async function startup()
{
let a = await shell.exec('cd .. && cd mt && sudo ./server1.sh', {silent: true}).stdout;
console.log('Run Proxy at Start up')
}
async function run() {
let a = await shell.exec('cd .. && ls cd mt && sudo ./kill.sh && ./server1.sh', {silent: true}).stdout;
console.log(a)
let a = await shell.exec('cd .. && cd mt && sudo ./kill.sh && sudo ./server1.sh', {silent: true}).stdout;
console.log('Reset Proxy')
}
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install
npm install -g pm2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment