server.js 840 B

1234567891011121314151617181920212223242526
  1. 'use strict'
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Http server
  5. |--------------------------------------------------------------------------
  6. |
  7. | This file bootstrap Adonisjs to start the HTTP server. You are free to
  8. | customize the process of booting the http server.
  9. |
  10. | """ Loading ace commands """
  11. | At times you may want to load ace commands when starting the HTTP server.
  12. | Same can be done by chaining `loadCommands()` method after
  13. |
  14. | """ Preloading files """
  15. | Also you can preload files by calling `preLoad('path/to/file')` method.
  16. | Make sure to pass relative path from the project root.
  17. */
  18. const { Ignitor } = require('@adonisjs/ignitor')
  19. new Ignitor(require('@adonisjs/fold'))
  20. .appRoot(__dirname)
  21. .fireHttpServer()
  22. .catch(console.error)