From cc2e048137b81b0b79875c233cc7254209485b90 Mon Sep 17 00:00:00 2001 From: amuliang <982632988@qq.com> Date: Wed, 2 Aug 2023 15:42:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0start.sh=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html.sh | 8 ++++++++ html/index.html | 5 +++-- server.sh | 11 +++++++++++ start.sh | 6 ++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 html.sh create mode 100644 server.sh create mode 100644 start.sh diff --git a/html.sh b/html.sh new file mode 100644 index 0000000..c2dcbc3 --- /dev/null +++ b/html.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# 下载依赖包 +npm install http-server -g + +# 运行前端页面 +cd /music-downloader/html +http-server -p 8080 \ No newline at end of file diff --git a/html/index.html b/html/index.html index 8a6144a..876c71d 100644 --- a/html/index.html +++ b/html/index.html @@ -121,8 +121,9 @@ el: "#app", data() { const ajax = axios.create({ - baseURL: 'http://localhost:5000', - timeout: 5000, + baseURL: 'http://www.amuliang.top:5750', + //baseURL: 'http://localhost:5000', + timeout: 10000, headers: { 'Content-Type': 'application/x-www-form-urlencoded', //'Access-Control-Allow-Origin': true diff --git a/server.sh b/server.sh new file mode 100644 index 0000000..ce16706 --- /dev/null +++ b/server.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# 下载依赖包 +npm install + +# 拉取代码 +cd / +git clone http://192.168.1.253:9130/amuliang/music-downloader.git + +# 运行服务器端 +node /music-downloader/app/main.js \ No newline at end of file diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..c36c32d --- /dev/null +++ b/start.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +./server.sh & +./start.sh & + +echo "start success !!!" \ No newline at end of file