Request to NodeAPI container timing out
neelp1 opened this issue · 3 comments
I used the Docker setup (not the manual setup) as stated in the readme then I used
http POST http://localhost:1337/api/oauth/token grant_type=password client_id=android client_secret=SomeRandomCharsAndNumbers username=myapi password=abc1234
but received
http: error: Request timed out (30s).
and also tried using Postman like in here #32 but stays on "sending request" status.
Has anyone come across this issue using the Docker setup?
Hey neelp1,
===== Please check step =====
- git clone https://github.com/ealeksandrov/NodeAPI.git
- docker-compose up -d --build
- docker exec nodeapi_node_api_1 node generateData.js
- postman -> https://documenter.getpostman.com/view/1836801/nodeapi/RW1hhG1N
Still getting the no response. I turned off ssl verification and turned off use my system's proxy. Possibly something wrong with the container?
However, images seem ok by looking at the logs:
{"level":"info","message":"Express server listening on port 1337","timestamp":"2018-05-09T05:05:07.288Z"} {"level":"error","message":"Connection error: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.19.0.2:27017]","timestamp":"2018-05-09T05:05:07.678Z"} {"level":"info","message":"Connected to DB!","timestamp":"2018-05-09T05:05:27.957Z"} {"level":"info","message":"New user - myapi:abc1234","timestamp":"2018-05-09T05:05:28.125Z"} {"level":"info","message":"New client - android:SomeRandomCharsAndNumbers","timestamp":"2018-05-09T05:05:28.126Z"}