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.

572 questions
4
votes
2 answers

Can AdonisJs be used for REST APIS?

Sorry for a nooby question. I'd ask it anyway! I am playing around with AdonisJs. I understand it is a MVC framework. But I want to write REST APIs using the said framework. I could not find much help on the internet. I have two questions: Does…
aitchkhan
  • 1,106
  • 10
  • 32
3
votes
1 answer

How to send CSV data from Neo4j query results through Node.js/AdonisJs

Currently, I have some code that query from Neo4j database then write to a CSV file on server: const session = driver.session(); const query = ''; var file = fs.createWriteStream('export.csv'); file.write('
Tom Roman
  • 33
  • 5
3
votes
0 answers

What causes IocLookupException?

I wonder what causes IocLookupException in an adonis project. To be more specific, E_IOC_LOOKUP_FAILED: Cannot resolve "..." namespace from the IoC Container What methods/tools can be used to determine the root of the issue so that you can prevent…
Clay
  • 328
  • 3
  • 10
3
votes
2 answers

adonis issue: error: `migration:run` is not a registered command

I Have installed @adonisjs/lucid. create a migration to use command adonis make:migration task ** task code** 'use strict' const Schema = use('Schema') class TaskSchema extends Schema { up() { this.create('tasks', table => { …
MD JAMIL AJ
  • 161
  • 1
  • 14
3
votes
2 answers

AdonisJs - Custom JWT uid field key

I have built an API using Laravel, with Laravel Passport. Everything works great, but what I'm trying to achive now, is to build a new API using AdonisJs - for a few smaller things for the website but have the authentication same for both…
3
votes
1 answer

How i can make custom validators in adonis /node.js?

Actually i have one function store(){} in my controller that make several validations, this validations return response status specific, i'm thinking if exist one way that i can import this validations and test before the create() method. Actually…
bla
  • 667
  • 4
  • 19
3
votes
1 answer

How do I set a default value using enum type in column Mysql using Knex.js?

I am using AdonisJS to make a backend application. In migrations, specifically in models, we have the option of creating models, but I can't use a default value in enun type. After reading the Knex.js documentation, I couldn't find a way to put this…
3
votes
1 answer

Generate UUID in Adonisjs and MySQL isn't working

i have a problem to understand how to create UUID in adonisjs, my database using MySQL. When i'm start server and post data, this id_customer output still in auto-increment model. Anyone can help me how to solving this problem? This is schema code…
bch21378
  • 101
  • 13
3
votes
3 answers

How to use React.js with AdonisJs

How can I use React.js in the front-end of my AdonisJs project? I've tried to install react with npm install react I thought this will works correctly. I made a file app.js with this code: var React = require('react'); var ReactDOM =…
Ayech Hamza
  • 129
  • 2
  • 10
3
votes
2 answers

Adonis.js search queries

I'm trying to find a way to execute a search query using AdonisJs but I cannot find any way to do this with Lucid ORM... I'm currently using this, but it's clearly not the right way to make a search query: let posts = yield…
hailton
  • 457
  • 3
  • 12
3
votes
2 answers

How to call a generator (async) function on an interval basis

I am building an app that must poll remote devices (generator fn sendRequests()) every 2 seconds. What's the right way to call the generator fn using setInterval, which isn't a generator and doesn't yield function * sendRequests() { // multiple…
Tremendus Apps
  • 1,302
  • 8
  • 16
2
votes
0 answers

How to subscribe to an adonisjs web socket channel in gdscript?

I'm trying to combine adonisjs(v4.1) websocket with gdscript. And that means that I need to connect to adonisjs from godot by gdscript code. Now the more clear question is "because adonisjs socket is running on a channel, how to subscribe to the…
Mahmood
  • 113
  • 6
2
votes
1 answer

Adonis 5.0 TypeError: Cannot read property 'length' of undefined

I am trying to setup lucid on adonis 5.0 after installation using node ace invoke @adonisjs/lucid OS: windows 10 node version: 14.6.1 npx version: 6.14.12 Expected Result --Set up lucid Actual Result TypeError: Cannot read property 'length' of…
2
votes
2 answers

How can I solve a crash in an Adonis app starting?

this is my first question ever. I'm trying to run an Adonis.js app by entering adonis serve --dev at the terminal. The messages are always the same in this succession: SERVER STARTED Watching files for changes... Fatal error in , line 0 Check…
2
votes
1 answer

profilePic.move is not a function [AdonisJS]

I am facing the error while trying to upload a file(image) via the form on AdonisJS (I referred to the official docs @AdonisJS4.1 File Uploads) await profilePic.move(Helpers.tmpPath('uploads'), { name: 'custom.jpg', overwrite: true }) if…
Priy4x
  • 23
  • 3
1
2
3
38 39