Hello, I want to upload an Api made in adonisjs to aws but it doesn't work for me, this is what I did, create a normal instance with the Ubuntu OS and perform a git clone, then run a
npm install --save
in the api that I just cloned to install the modules and create the .env file to assign the configuration where the server will start, this is the default configuration of an .env
HOST=127.0.0.1
PORT=3333
NODE_ENV=development
APP_NAME=AdonisJs
APP_URL=http://${HOST}:${PORT}
CACHE_VIEWS=false
APP_KEY=0fL3Ju674VAreZZkNYPe0gtUJcRRUUiX
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=root
DB_PASSWORD=
DB_DATABASE=adonis
HASH_DRIVER=bcrypt
The server will start and everything is fine, but it will start locally, due to the .env configuration, so I modify this so that it starts on port 3333 and that's it, but it didn't work for me.
It is in the configuration to start on port 3333
HOST=
PORT=3333
NODE_ENV=development
APP_NAME=AdonisJs
APP_URL=:${PORT}
When starting the server I get this in the terminal:
By default, EC2 instances come with all ports capped except SSH. You have to edit the Security Group ( Security Group ), so that the instance can be accessed from the Internet or only from your Intranet.