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

无法启动 easy-mock #56

Closed
ronesam opened this issue Sep 13, 2017 · 1 comment
Closed

无法启动 easy-mock #56

ronesam opened this issue Sep 13, 2017 · 1 comment

Comments

@ronesam
Copy link

ronesam commented Sep 13, 2017

OS / Browser Version

centos 6.5

Node.js / MongoDB Version

Nodejs: 7.10.1
MongoDB: 3.4.8

Steps to reproduce

$ npm i
$ npm run build
$ npm run start

What is Expected?

正常访问

What is actually happening?

访问提示以下信息:
12:58:04.226Z INFO easy-mock: <-- GET / (req_id=30d13997-172e-4fe9-b50c-837597e3d0d9, req.remoteAddress=::ffff:192.168.52.180, req.remotePort=55671)
GET / HTTP/1.1
host: 192.168.51.112
connection: keep-alive
cache-control: max-age=0
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8
accept-encoding: gzip, deflate
accept-language: zh-CN,zh;q=0.8,en;q=0.6
12:58:04.853Z INFO easy-mock: <-- GET /api/project?page_size=30&page_index=1&keywords=&type=&group=&filter_by_author=0 (req_id=4cddf2e7-1ae7-4d6f-9a0c-f47fe1838cea, req.remoteAddress=::ffff:127.0.0.1, req.remotePort=58413)
GET /api/project?page_size=30&page_index=1&keywords=&type=&group=&filter_by_author=0 HTTP/1.1
accept: application/json, text/plain, /
authorization: Bearer undefined
user-agent: axios/0.15.3
host: 127.0.0.1
connection: close
12:58:04.873Z WARN easy-mock: --> GET /api/project?page_size=30&page_index=1&keywords=&type=&group=&filter_by_author=0 401 18ms (req_id=4cddf2e7-1ae7-4d6f-9a0c-f47fe1838cea, duration=18, req.remoteAddress=::ffff:127.0.0.1, req.remotePort=58413)
GET /api/project?page_size=30&page_index=1&keywords=&type=&group=&filter_by_author=0 HTTP/1.1
accept: application/json, text/plain, /
authorization: Bearer undefined
user-agent: axios/0.15.3
host: 127.0.0.1
connection: close
--
HTTP/1.1 401 Unauthorized
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,HEAD,PUT,POST,DELETE
X-Request-Id: 4cddf2e7-1ae7-4d6f-9a0c-f47fe1838cea
Content-Type: application/json; charset=utf-8
Content-Length: 66
Date: Wed, 13 Sep 2017 12:58:04 GMT
Connection: close
(node:20221) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): [object Object]
(node:20221) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@ronesam
Copy link
Author

ronesam commented Sep 14, 2017

我知道为什么了,首次访问的时候一定要带上 '/' .
必须是 192.168.*.*/
注册完用户之后就不用了.

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