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(‘…

Can’t access Adonis from Docker Container

I use Docker to contain my Adonis app. The build was success but when I access the app, I got ERR_SOCKET_NOT_CONNECTED or ERR_CONNECTION_RESET. My docker compose contains adonis and database. Previously, I use the setup similar with this for my expressjs app, and it has no problem. The adonis .env is remain standard, modification. This is my setup: I couldn’t spot anything wrong with my setup. Answer The serve command starts the HTTP server on port defined inside the .env file in the project root. Can you share that file in the post if the solution below does not work?

How to update a constraint in a migration

I need to add onDelete and onUpdate cascade to a constraint in a migration file. So i did an alter table, selecting the foreign keys and chaining with the alter method in the end of each command. But i’m getting a error saying that the constraint of this relationship already exists. error: constraint “deliveries_courier_id_foreign” for relation “deliveries” already exists How can i update a constraint of a table in a migration? Answer First i have to drop the foreign key column and then create it again. We can do that with Arbitrary Code in migrations We can also uso the

Return view in controller AdonisJS

How can I return a view and display it through the controller in AdonisJs ‘use strict’ class PostController { index(){ return view.render(‘welcome’) } } module.exports = PostController …