From bf63539aa7c54e1f06d10f0afc095a516cd6b2e0 Mon Sep 17 00:00:00 2001 From: Julien Le Coupanec Date: Wed, 6 May 2020 10:40:31 +0200 Subject: [PATCH] docs(adonis): helpers --- backend/adonis.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/backend/adonis.js b/backend/adonis.js index d1ef13d..9110e06 100644 --- a/backend/adonis.js +++ b/backend/adonis.js @@ -423,6 +423,26 @@ Drive.getObject(location, params) // Get S3 object for a given Drive.getUrl(location, [bucket]) // Get url for a given file (accepts optional alternative bucket param). Drive.getSignedUrl(location, expiry = 900, params) // Get signed url for a given file (expiry set to 15mins by default). +/******************************************************************************************** +* HELPERS +* https://adonisjs.com/docs/helpers +********************************************************************************************/ + +const Helpers = use('Helpers') + +Helpers.appRoot() // Returns path to the application root. +Helpers.publicPath([toFile]) // Returns path to the public directory or file inside the directory. +Helpers.configPath([toFile]) // Returns path to the config directory or file inside the directory. +Helpers.resourcesPath([toFile]) // Returns path to the resources directory or file inside the directory. +Helpers.migrationsPath([toFile]) // Returns path to the migrations directory or file inside the directory. +Helpers.seedsPath([toFile]) // Returns path to the seeds directory or file inside the directory. +Helpers.databasePath([toFile]) // Returns path to the database directory or file inside the directory. +Helpers.viewsPath([toFile]) // Returns path to the views directory or file inside the directory. +Helpers.tmpPath([toFile]) // Returns path to the tmp directory or file inside the directory. + +Helpers.promisify() // Returns promisified callback functions. +Helpers.isAceCommand() // Returns whether the process was started as the ace command or not. + /******************************************************************************************** * SOCIAL AUTHENTICATION * https://adonisjs.com/docs/social-auth