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
2
votes
0 answers

How to extend AdonisJS Ally?

I tried to extend with Tumblr provider on Ally, from AdonisJS. { OAuthException: E_OAUTH_TOKEN_EXCHANGE: oauth_signature does not match expected value at Function.tokenExchangeException…
pirmax
  • 2,054
  • 8
  • 36
  • 69
2
votes
0 answers

adonisjs v4 Specified key was too long; max key length is 767 bytes

I'm getting this error when using migration:run and my schema is: 'use strict' const Schema = use('Schema') class UserSchema extends Schema { up() { this.create('users', table => { …
Emad Fani
  • 415
  • 4
  • 13
2
votes
2 answers

How to config domain for Adonisjs project?

Simple when run npm run dev, adonisjs will run with domain: http://localhost:3333 But i wanna config with domain: http://blog.com http://blog.local Please help me!!!
huy hoang
  • 43
  • 3
2
votes
2 answers

How to change http exception in adonisjs?

I am newbie in adonisjs. I want to implement custom response if route method not match. I have route like this Route.post('/create', function * (request, response) {response.send('success')}) when call url /create with GET in browser, It send…
Arwani Ali
  • 41
  • 4
1
vote
1 answer

SSR does not run in Adonis Js and Inertia Js

I want to use SSR but an error occurs as follows, if not using SSR application then it runs normally. I am using adonis Js and Vue Js repository. https://github.com/eidellev/inertiajs-adonisjs ERRO require() of ES Module…
marcelo.delta
  • 2,730
  • 5
  • 36
  • 71
1
vote
0 answers

Column Type and Value change in seeder between Postgres and SQLite

I'm stumped by a very weird problem and to be honest I'm not even sure what to search for on google. This is the situation: I am using AdonisJS and it's migration/seeder functionality. I have a seeder that creates data in a table: import BaseSchema…
user2037559
  • 77
  • 1
  • 2
  • 15
1
vote
1 answer

AdonisJS multipart file uplaod

public async create({ request, response }: HttpContextContract) { try { await request.multipart .onFile( 'file', { size: '900mb', }, async (file, reportChunk) => { …
1
vote
0 answers

Group users by month for last year in Lucid

I am working on a project on AdonisJs and Lucid ORM where i need to show a chart with user registration count grouped by every month (created_at -> month name) for the last year. I did this query in Laravel eloquent but didn't find a solution for…
1
vote
2 answers

How insert data array of object to db

I want to insert the data like below: "car" : [ { "name": "toyota", "color": "red", }, { "name": "hyundai", "color": "black", }, { "name": "honda", "color":…
student
  • 13
  • 3
1
vote
1 answer

AdonisJS hasManyThrough through a hasOne

I have the following models: Usuario has many RolesUsuario belongsTo Rol I want to setup a hasManyThrough in Usuario so that I can access the list of roles for a user with a simpler preload. The documentation for the hasManyThrough doesn't fully…
Leticia Esperon
  • 2,499
  • 1
  • 18
  • 40
1
vote
1 answer

Transaction query already complete, run with DEBUG=knex:tx

when I work with japa test runner adonisJs 5 my test failed and got this error: × Uncaught exception Transaction query already complete, run with DEBUG=knex:tx for more info 1 completedError …
1
vote
0 answers

How to transform any column while fetching models

I am using adonisjs 5 for my project to create REST APIs. I am fetching records from Employees table. But what I want want to do is to format dob column to YYYY-MM-DD when retrieving the data. I am not sure how to achieve it ... Thanks I have tried…
1
vote
0 answers

Problem for delete character added by mask

I'm a junior developer and in charge of implementing some masks for inputs in customer web application. I already implement the function that made the mask, but the functions has a problem, I can't delete the characters added by the mask. Someone…
1
vote
1 answer

how to get relationship data in adonis js

I have a relational model in adonis that I want to retrieve the data (Post belongs to Category). I've set up the relationship in both of migration and model, But when I try to get the category name from the first Post with const posts = await…
1
vote
0 answers

adonis 5 computed column on pivot-table

I understand we can add additional columns on pivot tables when using manyToMany decorator on a lucid model: @manyToMany(() => Skill, { pivotColumns: ['proficiency'], }) public skills: ManyToMany I wanted to know if it is possible to…
w3bsite
  • 181
  • 1
  • 10