Deployment issue with AdonisJS 5 in EC2 Ubuntu #3186
Answered
by
icodefuture
icodefuture
asked this question in
Help
-
I have deployed my API-only AdonisJS 5 application to EC2. The application is running fine locally. Also, I am able to get the API response in the production server with curl like below. curl http://localhost:3333/test It returns {"message":"Test Message from API"} However, after setting up the NGINX conf, once I hit the domain URL it's returning the following error message. {"message":"E_ROUTE_NOT_FOUND: Cannot GET:/","stack":"HttpException: E_ROUTE_NOT_FOUND: Cannot GET:/\n at Function.invoke (/var/www/api.hello.com/node_modules/@adonisjs/http-server/build/src/Exceptions/HttpException.js:31:23)\n at RequestHandler.findRoute (/var/www/api.hello.com/node_modules/@adonisjs/http-server/build/src/Server/RequestHandler/index.js:49:49)\n at RequestHandler.handle (/var/www/api.hello.com/node_modules/@adonisjs/http-server/build/src/Server/RequestHandler/index.js:65:14)\n at /var/www/api.hello.com/node_modules/@adonisjs/http-server/build/src/Server/index.js:77:44\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at Server.handleRequest (/var/www/api.hello.com/node_modules/@adonisjs/http-server/build/src/Server/index.js:108:13)","code":"E_ROUTE_NOT_FOUND"} Here is the NGINX conf
Here is the pm2 log
Adonis JS version "@adonisjs/core": "^5.3.0" Inside the .env I have the following host and port
Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Answered by
icodefuture
Sep 17, 2021
Replies: 1 comment 1 reply
-
It was an issue with routes |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
icodefuture
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It was an issue with routes