Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你起了两个服务么? #19

Closed
TaurusWood opened this issue Sep 29, 2017 · 1 comment
Closed

你起了两个服务么? #19

TaurusWood opened this issue Sep 29, 2017 · 1 comment

Comments

@TaurusWood
Copy link

TaurusWood commented Sep 29, 2017

我有点没看懂,
vue-cli里面已经用express起了一个服务,然后你单独用koa又启动了一个服务,是这样么?
我这里有两个问题:

  1. koa的端口你写的是8989,但是vue-cli的默认端口是3000吧,这个会冲突么?
  2. 你是如何在8989端口监听到webpack所编译的文件的呢?就像在vue-cli的dev-server.js中有app.use(devMiddleware)来做这一步。
@Molunerfinn
Copy link
Owner

开发模式下是起了两个端口的。1个是给webpack输出的express,1个是给koa的。
本项目中vue-cli起的服务是8080端口,具体在config/index.js里的dev处口以看到。这个可以自定义,找个不冲突的端口就行。
8989端口只是koa的端口。。注意看config/index.js里的proxyTable,做了一次代理,否则要跨域

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants