Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
group.before(() => {
Context.getter('request', function () {
return new Request(this.req, this.res, new Config())
}, true)
Context.getter('response', function () {
const config = new Config()
config.set('app.http.jsonpCallback', 'callback')
return new Response(this.request, config)
}, true)
setupResolver()
ioc.autoload(path.join(__dirname, 'app'), 'App')
})
group.before(async () => {
resolver.appNamespace('App')
ioc.autoload(path.join(__dirname, './app'), 'App')
registrar
.providers([
'@adonisjs/framework/providers/AppProvider',
'@adonisjs/redis/providers/RedisProvider',
path.join(__dirname, '../../providers/KueProvider'),
path.join(__dirname, '../../providers/CommandsProvider')
])
.register()
ioc.bind('Adonis/Src/Helpers', () => {
return new Helpers(__dirname)
})
ioc.alias('Adonis/Src/Helpers', 'Helpers')
ioc.bind('Adonis/Src/Config', () => {
const config = new Config()
config.set('kue', {
connection: 'kue'
module.exports = function () {
process.env.ENV_SILENT = true
ioc.bind('Adonis/Src/Helpers', function () {
return new Helpers(path.join(__dirname, './'))
})
setupResolver()
ioc.autoload(path.join(__dirname), 'App')
return new Promise((resolve, reject) => {
registrar
.providers(providers)
.registerAndBoot()
.then(resolve)
.catch(reject)
})
}