繁体   English   中英

如何在AWS EC2上将日期发布到服务器

[英]How to Post date to server on AWS EC2

在ASW EC2的Linux服务器上部署了express-mongodb`后端,当我在个人PC上测试后端时,我使用

http://localhost:3000/app_v1/api/users

与身体:

{
    "user_name" : "josh",
    "user_email" : "josh.M@gmail.com",
    "user_password" : "123"
}

注册用户,效果很好。

现在,我已将其部署在AWS EC2(Ubantu 16.04)上,并希望做同样的事情。 我启动了MongoDB和节点服务器,该服务器显示服务器在端口3000上启动。

尝试通过邮递员将数据发布到服务器,但显示连接到时出现错误

http://ec2-18-216-132-220.us-east-2.compute.amazonaws.com:3000/app_v1/api/users

with body:

{
    "user_name" : "josh",
    "user_email" : "josh.M@gmail.com",
    "user_password" : "123"
}

邮递员留言:

Why this might have happened:
The server couldn't send a response:
Ensure that the backend is working properly
Self-signed SSL certificates are being blocked:
Fix this by turning off 'SSL certificate verification' in Settings > General
Proxy configured incorrectly
Ensure that proxy is configured correctly in Settings > Proxy
Request timeout:
Change request timeout in Settings > General

我只是弄清楚了,我的服务器侦听了3000,但是我没有在我的安全组中允许它,所以将3000添加到入站中就可以了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM