-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4601338
Showing
36 changed files
with
24,074 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"typescript": true, | ||
"commands": [ | ||
"./commands", | ||
"@adonisjs/core/build/commands", | ||
"@adonisjs/repl/build/commands" | ||
], | ||
"exceptionHandlerNamespace": "App/Exceptions/Handler", | ||
"aliases": { | ||
"App": "app", | ||
"Config": "config", | ||
"Database": "database", | ||
"Contracts": "contracts" | ||
}, | ||
"preloads": [ | ||
"./start/routes", | ||
"./start/kernel" | ||
], | ||
"providers": [ | ||
"./providers/AppProvider", | ||
"@adonisjs/core", | ||
"@adonisjs/session", | ||
"@adonisjs/view", | ||
"@adonisjs/shield" | ||
], | ||
"metaFiles": [ | ||
{ | ||
"pattern": "public/**", | ||
"reloadServer": false | ||
}, | ||
{ | ||
"pattern": "resources/views/**/*.edge", | ||
"reloadServer": false | ||
} | ||
], | ||
"aceProviders": [ | ||
"@adonisjs/repl" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.json] | ||
insert_final_newline = ignore | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PORT=3333 | ||
HOST=0.0.0.0 | ||
NODE_ENV=development | ||
APP_KEY=qhU1h1_YiK6AMMcvadO1FpD4mjgn2M1p | ||
SESSION_DRIVER=cookie | ||
CACHE_VIEWS=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
build | ||
coverage | ||
.vscode | ||
.DS_STORE | ||
.env | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Ace Commands | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This file is the entry point for running ace commands. | ||
| | ||
*/ | ||
|
||
require('reflect-metadata') | ||
require('source-map-support').install({ handleUncaughtExceptions: false }) | ||
|
||
const { Ignitor } = require('@adonisjs/core/build/standalone') | ||
new Ignitor(__dirname) | ||
.ace() | ||
.handle(process.argv.slice(2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"commands": { | ||
"dump:rcfile": { | ||
"settings": {}, | ||
"commandPath": "@adonisjs/core/build/commands/DumpRc", | ||
"commandName": "dump:rcfile", | ||
"description": "Dump contents of .adonisrc.json file along with defaults", | ||
"args": [], | ||
"aliases": [], | ||
"flags": [] | ||
}, | ||
"list:routes": { | ||
"settings": { | ||
"loadApp": true | ||
}, | ||
"commandPath": "@adonisjs/core/build/commands/ListRoutes", | ||
"commandName": "list:routes", | ||
"description": "List application routes", | ||
"args": [], | ||
"aliases": [], | ||
"flags": [ | ||
{ | ||
"name": "json", | ||
"propertyName": "json", | ||
"type": "boolean", | ||
"description": "Output as JSON" | ||
} | ||
] | ||
}, | ||
"generate:key": { | ||
"settings": {}, | ||
"commandPath": "@adonisjs/core/build/commands/GenerateKey", | ||
"commandName": "generate:key", | ||
"description": "Generate a new APP_KEY secret", | ||
"args": [], | ||
"aliases": [], | ||
"flags": [] | ||
}, | ||
"repl": { | ||
"settings": { | ||
"loadApp": true, | ||
"environment": "repl", | ||
"stayAlive": true | ||
}, | ||
"commandPath": "@adonisjs/repl/build/commands/AdonisRepl", | ||
"commandName": "repl", | ||
"description": "Start a new REPL session", | ||
"args": [], | ||
"aliases": [], | ||
"flags": [] | ||
} | ||
}, | ||
"aliases": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Http Exception Handler | ||
|-------------------------------------------------------------------------- | ||
| | ||
| AdonisJs will forward all exceptions occurred during an HTTP request to | ||
| the following class. You can learn more about exception handling by | ||
| reading docs. | ||
| | ||
| The exception handler extends a base `HttpExceptionHandler` which is not | ||
| mandatory, however it can do lot of heavy lifting to handle the errors | ||
| properly. | ||
| | ||
*/ | ||
|
||
import Logger from '@ioc:Adonis/Core/Logger' | ||
import HttpExceptionHandler from '@ioc:Adonis/Core/HttpExceptionHandler' | ||
|
||
export default class ExceptionHandler extends HttpExceptionHandler { | ||
protected statusPages = { | ||
'403': 'errors/unauthorized', | ||
'404': 'errors/not-found', | ||
'500..599': 'errors/server-error', | ||
} | ||
|
||
constructor () { | ||
super(Logger) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { listDirectoryFiles } from '@adonisjs/core/build/standalone' | ||
import Application from '@ioc:Adonis/Core/Application' | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Exporting an array of commands | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Instead of manually exporting each file from this directory, we use the | ||
| helper `listDirectoryFiles` to recursively collect and export an array | ||
| of filenames. | ||
| | ||
| Couple of things to note: | ||
| | ||
| 1. The file path must be relative from the project root and not this directory. | ||
| 2. We must ignore this file to avoid getting into an infinite loop | ||
| | ||
*/ | ||
export default listDirectoryFiles(__dirname, Application.appRoot, ['./commands/index']) |
Oops, something went wrong.