Questions tagged [adonis.js]

Adonis is a full stack, open source MVC framework for Node.js. The framework is inspired by the PHP framework Laravel.

AdonisJs is an MVC Framework for Node.js.

It includes:

  • Lucid ORM
  • Database Migrations
  • Authentication System
  • OAuth
  • Mailing System
  • Data Validator
  • Testing

Learn more on the website and check out the organization on Github.

739 questions
1
vote
1 answer

Adonis - 502 Bad Gateway on Elastic BeanStalk

I am trying to deploy an AdonisJS app on Elastic Beanstalk. I have followed several tutorials to do so but I am getting 502 Bad Gateway :( I have set PORT env variable to 8081 from the Configuration portal as suggested in all the tutorials out…
1
vote
1 answer

AdonisJs Cannot find module 'phc-bcrypt'

When I call some route I receive this error: Cannot find module 'phc-bcrypt' Cannot find module 'phc-bcrypt' I am working with AdonisJS 5
1
vote
0 answers

How to use Currency.js library in Adonis.js?

I need to use some library to manage currencies (add, sum, floating point, etc.) in Adonis.js v4. I found different libraries that should work (Diner.js, currency.js, money.js), but I am unable to use those libraries with Adonis. For example with…
1
vote
1 answer

adonis transformer include. getting 500 error

Inside ScheduleController I call ScheduleTransformer including GroupTransformer. Inside StudentController I call StudentTransformer including GroupTransformer. GroupTransformer availableInclude schedule and students Once started the server, in…
Eduardo
  • 21
  • 3
1
vote
1 answer

Adonis has detected an unhandled promise rejection, which may cause undesired behavior in production

You are using adonisJS in a health check service and are trying to make two requests according to axes in a Service. I get a warning from Adonis "Adonis has detected an unhandled promise rejection, which may cause undesired behavior in production…
Felipe Melo
  • 21
  • 1
  • 3
1
vote
0 answers

AdonisJs configure Indicative

I need to remove all body attributes that is not on the rules of my Validator, Adonis uses the Indicative lib to validate the data and on its configuration I can use the removeAdditional to remove the attributes. The problem is how do I configure…
Alessandro Macanha
  • 711
  • 1
  • 7
  • 20
1
vote
2 answers

Telnet connection with JavaScript

I am working with a Numato relay, and I try to connect to it via telnet using javascript with net.Socket, and then send commands. However, when trying to connect, it rejects the username and password. The problem is that strange characters are…
Strife52
  • 11
  • 1
1
vote
3 answers

Adonis 5 build did not copy env file into build folder

I used Adonis 5 in production, everytime I try npm run build .env file didn't copy into the build folder, is it still a bug?
1
vote
2 answers

there is a "Alphanumeric" option for adonis js5 Validator?

Hi everybody i end of to read the documentation of adonis js for to use "validation rules" but i dont see a option for to validate a "alphanumeric" value(in adonisjs 4.1 this exist but i try to migrate to adonis 5), i have the way of to make this…
Gario3
  • 139
  • 2
  • 13
1
vote
1 answer

AdonisJS V4 - belongsToMany - sync()/attach() - invalid input syntax for type uuid: ""

Not sure why Im getting this error: invalid input syntax for type uuid: "" The beforeCreate hook event works, and inserts the column ID but I still get that weird error. Is there something I'm missing here?   Pivot…
frost kazuma
  • 350
  • 1
  • 8
  • 24
1
vote
1 answer

AdonisJS 5 - preload model even if foreign key is null

I want to preload a model even if it have a null foreign key. I'll use the models from Adonis docs page to ilustrate: User and Profile. const user = await User.query().preload("profile") Simple as that! But in my case, if a user have the key…
tomrlh
  • 1,006
  • 1
  • 18
  • 39
1
vote
1 answer

Adonis-Js : Get a specifc number of Entities in relationship with another Entity

I need your help in Adonis-Js for loading an an entity with relationships. Here is my problem : I have two entities : Contact (belongsTo Contactgroup) Contactgroup (hasMany Contact) I want to make a request to get the list of Contactgroup with…
1
vote
1 answer

Is it possible to have a scheduler starting only on one instance?

I have a backend written in Adonis v4.1 (node.js) that I'm deploying on AWS ECS. Inside the Task Definition of my API I have Adonis and Redis, linked by bridge network. I'm using adonis-scheduler to run a cronjob every 30 minutes. This cronjob makes…
Agilulfo
  • 101
  • 3
  • 10
1
vote
1 answer

Add new object on Session create

Im new here! I have a session on my application. Iam using ADONIS on my API. How I can attach new object, user_company when user login (session create). class SessionController { async store ({ request, response, auth }) { const { email,…
1
vote
1 answer

Knex, start with

I have adonis back end (that run knex under the hood) that sending some data to front end according user filtering. I need to implement one of the filtering parameters with something like startWith js method, to check if the text that user submitted…
Hagai Harari
  • 2,767
  • 3
  • 11
  • 23