簡體   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