Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
bp
op-web-service
Commits
eed478c4
Commit
eed478c4
authored
May 26, 2021
by
lvweichao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: build command
parent
f04e696a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
13 deletions
+37
-13
README.md
fe/app/op-management/README.md
+26
-0
app.js
fe/app/op-management/app.js
+1
-6
start.sh
fe/app/op-management/bin/start.sh
+1
-1
package.json
fe/app/op-management/package.json
+8
-5
vue.config.js
fe/app/op-management/vue.config.js
+1
-1
No files found.
fe/app/op-management/README.md
0 → 100644
View file @
eed478c4
# op management
op 运营管理系统
# 开发
-
Node: 最新 LTS 版本即可(目前 v14.15.4 运行正常)
-
PM2: 最新稳定版即可
-
NPM 源:可以使用淘宝源
-
Yarn: 最新稳定版
-
lock 文件:大家 Node 环境不一致(目前并没有影响),防止总有冲突,暂时未同步到 git 仓库
# 项目启动
启动 Node 服务
```
shell
npm run dev
```
启动 Webpack 服务
```
shell
# 新版
npm run web-dev
```
\ No newline at end of file
fe/app/op-management/app.js
View file @
eed478c4
...
@@ -7,18 +7,13 @@ const router = require('./server/router');
...
@@ -7,18 +7,13 @@ const router = require('./server/router');
const
config
=
require
(
'./server/config'
);
const
config
=
require
(
'./server/config'
);
const
env
=
process
.
env
.
NODE_ENV
;
const
env
=
process
.
env
.
NODE_ENV
;
console
.
log
(
3333
,
env
)
const
app
=
new
Koa
();
const
app
=
new
Koa
();
app
.
use
(
serve
(
path
.
join
(
__dirname
,
'./public'
)));
app
.
use
(
serve
(
path
.
join
(
__dirname
,
'./public'
)));
app
.
use
(
bodyParser
());
app
.
use
(
bodyParser
());
// app.use(views(path.join(__dirname + '/../views'), { extension: 'ejs' }));
app
.
use
(
router
.
routes
(),
router
.
allowedMethods
());
app
.
use
(
router
.
routes
(),
router
.
allowedMethods
());
app
.
use
(
async
(
ctx
)
=>
{
console
.
log
(
222
,
ctx
)
})
app
.
listen
(
config
.
port
,
()
=>
{
app
.
listen
(
config
.
port
,
()
=>
{
console
.
info
(
console
.
info
(
'Listening on port %s in %s mode, Open up http://127.0.0.1:%s/ in your browser.'
,
'Listening on port %s in %s mode, Open up http://127.0.0.1:%s/ in your browser.'
,
...
...
fe/app/op-management/bin/start.sh
View file @
eed478c4
...
@@ -7,7 +7,7 @@ port=$2
...
@@ -7,7 +7,7 @@ port=$2
if
[
!
-n
"
$port
"
]
if
[
!
-n
"
$port
"
]
then
then
port
=
"
3030
"
port
=
"
8055
"
fi
fi
if
[
$env
!=
"production"
]
if
[
$env
!=
"production"
]
...
...
fe/app/op-management/package.json
View file @
eed478c4
...
@@ -4,9 +4,13 @@
...
@@ -4,9 +4,13 @@
"private"
:
true
,
"private"
:
true
,
"main"
:
"app.js"
,
"main"
:
"app.js"
,
"scripts"
:
{
"scripts"
:
{
"start"
:
"cross-env NODE_ENV=development vue-cli-service serve"
,
"dev"
:
"sh ./bin/start.sh development"
,
"build"
:
"cross-env NODE_ENV=production vue-cli-service build"
,
"test"
:
"sh ./bin/start.sh testing"
,
"koa"
:
"cross-env NODE_ENV=development nodemon app.js"
,
"prod"
:
"sh ./bin/start.sh production"
,
"web-dev"
:
"cross-env NODE_ENV=development vue-cli-service serve"
,
"web-build"
:
"cross-env NODE_ENV=production vue-cli-service build"
,
"test:unit"
:
"vue-cli-service test:unit"
,
"test:unit"
:
"vue-cli-service test:unit"
,
"lint"
:
"vue-cli-service lint"
"lint"
:
"vue-cli-service lint"
},
},
...
@@ -19,7 +23,6 @@
...
@@ -19,7 +23,6 @@
"koa-router"
:
"^10.0.0"
,
"koa-router"
:
"^10.0.0"
,
"koa-static"
:
"^5.0.0"
,
"koa-static"
:
"^5.0.0"
,
"koa-views"
:
"^7.0.1"
,
"koa-views"
:
"^7.0.1"
,
"nodemon"
:
"^2.0.7"
,
"request"
:
"^2.88.2"
,
"request"
:
"^2.88.2"
,
"vue"
:
"^3.0.11"
,
"vue"
:
"^3.0.11"
,
"vue-router"
:
"^4.0.0-beta.12"
,
"vue-router"
:
"^4.0.0-beta.12"
,
...
@@ -40,7 +43,7 @@
...
@@ -40,7 +43,7 @@
"eslint-plugin-vue"
:
"^7.0.0-alpha.0"
,
"eslint-plugin-vue"
:
"^7.0.0-alpha.0"
,
"less"
:
"^3.0.4"
,
"less"
:
"^3.0.4"
,
"less-loader"
:
"^5.0.0"
,
"less-loader"
:
"^5.0.0"
,
"pm2"
:
"
^4.5.6
"
,
"pm2"
:
"
2.7.0
"
,
"prettier"
:
"^1.19.1"
"prettier"
:
"^1.19.1"
},
},
"browserslist"
:
[
"browserslist"
:
[
...
...
fe/app/op-management/vue.config.js
View file @
eed478c4
...
@@ -11,7 +11,7 @@ module.exports = {
...
@@ -11,7 +11,7 @@ module.exports = {
devServer
:
{
devServer
:
{
proxy
:
{
proxy
:
{
'/app/op-management/api'
:
{
'/app/op-management/api'
:
{
target
:
'http://localhost:80
66
'
,
target
:
'http://localhost:80
55
'
,
pathRewrite
:
{
'^/app/op-management/api'
:
''
},
pathRewrite
:
{
'^/app/op-management/api'
:
''
},
changeOrigin
:
true
,
changeOrigin
:
true
,
},
},
...
...
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