Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

adonis-framework

adonisjs418MIT3.0.14

Adonis framework makes it easy for you to write webapps with less code

adonis-framework, mvc, mvc-framework

readme

AdonisJs Framework

Version Build Status Coverage Status Downloads License

Gitter Trello Support AdonisJs


AdonisJs is a MVC framework for Node.js built around practical use cases to give you a perfect solution that meets all of your needs. We focus on writing elegant code and being one of the most stable frameworks in the Node Community. :evergreen_tree:

It is the first Node.js framework with support for Dependency Injection and to have a lean IoC Container to help you resolve and mock dependencies. It borrows the concept of Service Providers from the popular PHP framework Laravel that lets you easily write scalable applications.

You can learn more about AdonisJs and all of its awesomeness on http://adonisjs.com :rocket:




Requirements

AdonisJs is built on the top of ES2015, which makes the code more enjoyable and cleaner to read. It doesn't make use of any transpilers and depends upon Core V8 implemented features.

For these reasons, AdonisJs targets Node.js 4.0 or higher.


## Getting Started

AdonisJs provides a CLI tool to scaffold and generate a project with all required dependencies.

$ npm i -g adonis-cli
$ adonis new awesome-project
$ cd awesome-project
$ npm run start

:point_right: Read the Official Documentation


## Contribution Guidelines

In favor of active development we accept contributions from everyone. You can contribute by submitting a bug, creating pull requests or even improving documentation.

You can find a complete guide to be followed strictly before submitting your pull requests in the Official Documentation.

changelog

3.0.14 (2017-06-26)

3.0.13 (2017-04-25)

3.0.12 (2017-03-25)

Bug Fixes

  • view: attach isolated instance of view to response object (08bdca3), closes #489

3.0.11 (2017-02-25)

Bug Fixes

  • session: fix breaking test (24f953e)

3.0.10 (2017-02-25)

Bug Fixes

  • file: fix breaking tests (8235b8c)
  • file: fix to move file across devices (1e36b4f), closes #438
  • session: convert session age minutes to seconds (c697665), closes #459

3.0.9 (2017-01-28)

3.0.8 (2017-01-24)

Bug Fixes

  • make code consistent with node 7.0 (58b22e9)
  • package: update dotenv to version 3.0.0 (#417) (4f4af56)
  • routing: allow to prefix a group without a starting slash (#416) (391b149)
  • view: fix label default attribute, use for instead of name (#406) (c0fc707)

Features

  • file: add delete method to delete file (24825f0)

3.0.7 (2016-12-01)

Bug Fixes

  • form:select: do a type insensitive comparison (69a4eb9), closes #378

3.0.6 (2016-11-18)

Features

  • response: add response.plainCookie to add plain cookies (dd5a5e9)

3.0.5 (2016-11-08)

Bug Fixes

  • session: new cookie driver instance for each request (c784fbb)

3.0.4 (2016-11-02)

Bug Fixes

  • helpers: add / to namespace check in makeNameSpace (2b0053c)
  • session: clear cookie jar on request finish (7eaa051), closes #330

Features

  • server: Server.listen() return the http.Server instance (#319) (29a631b)

3.0.3 (2016-10-03)

Features

  • request: add extended support for accept header (7aaf09e)

3.0.2 (2016-09-23)

Bug Fixes

  • docs: broken links to docs (#277) (6dedd5b)
  • env: using ENV_PATH value as it is if isAbsolute (e5913d4)
  • file: return null when file not uploaded (4d05d2d)
  • tests: fix breaking test after mocha3.0 (8d96862)
  • view: patch view for to work as asyncEach (d283916), closes #258

Features

  • exceptions: add support for custom exceptions (fd0c008)
  • request: add support for fetching plain cookies (10b6c44)
  • request: add support for intended method (837ab7f)
  • response: add few more properties (46930eb)
  • session: add support for redis session driver (677cc4e), closes #190
  • session: make use of additional cookie options (4b2825c)

3.0.1 (2016-07-29)

Features

  • resource:middleware: chain middleware method on route resource(04d6acc)
  • route:resource: resource members & coll accepts callback(6603d4f)

3.0.0 (2016-06-26)

Bug Fixes

  • server: Fix for #128 (4aa4f80), closes #128
  • static-server: Fix for #124 where node-static was crashing (38efbd4), closes #124 #124

  • linting: fix linting error inside view extensions file(3095839)
  • middleware: Fix middleware layer to execute middleware in reverse after controller call(97857ab)
  • request: handle multiple file uploads(2d0dfcb)
  • route:test: improve test expectations to match instead of strict equal(31e8d6c)
  • server: add try/catch block to handle errors outside of co(36a40b6)
  • server: Fix for #128(4aa4f80), closes #128
  • session: fix sessions provider after node-cookie upgrade(8990f0d)
  • static-server: Fix for #124 where node-static was crashing(38efbd4), closes #124 #124
  • static-server: Fix for #124 where node-static was crashing(787573d), closes #124 #124

Features

  • Env: add support to load .env from different location(2503fbb)
  • event: add property eventName to scope emitter object(fee2a36)
  • event: add support for event emitter(8a7b3a7)
  • file: allow file instance to take validation options(36e3f1b)
  • form-helper: added form.open method to create html form tag(e6367ff)
  • form-helper: added method to add labels(e56a834)
  • form-helper: implemented all required html tags(082e8c8)
  • helpers: add makeNameSpace method(651972f)
  • helpers: add method to know whether process is for ace command(4beb8a2)
  • helpers: add methods to get path to database directories(85688c8)
  • request: Add collect method to form group of arrays with keys(d0e5303)
  • request: add support for adding macros(cfd129b)
  • response: add macro support(d7ad0ee)
  • Route: add router helper to render view(0f517cb)
  • server: add support to disable _method spoofing(43f21a2)
  • server: added the ability to obtain instance http.createServer () for socket.io (#165)(8d221d0)
  • static: Switch to server-static for serving static files(cc5be2a)
  • view: Add config option to disable service injection(9a9f3d4)
  • view: add globals for linkTo and linkToAction(3e6530d)
  • view: added makeString method and filter for making urls using controller methods(da7d080)
  • view: Make all views to have .nunjucks extension #133(8535172), closes #133

2.0.11 (2016-03-30)

2.0.10 (2016-03-26)

Bug Fixes

  • static-server: Fix for #124 where node-static was crashing (38efbd4), closes #124 #124

2.0.9 (2016-01-30)

Bug Fixes

  • request: method is and accepts have been fixed to treat arrays (9d8e963)
  • session: fixed session manager to keep updated session payload within one request #88 (1fe8b4b), closes #88
  • session: now list of drivers is set to an empty object by default (3bb75e0)
  • session-manager: avoiding reparsing of session body (0d8394d)

Features

  • middleware: middleware now accepts runtime parameters (6907053)
  • package: passing coverage report to coveralls (579ab3e)
  • package.json: make the repository commitizen-friendly (0082c4a)
  • request: add match method to match an array of patterns to current url (a81a4f7)
  • request: added hasBody and format methods to request instance (30739db)
  • request: Added raw method to access raw data sent to a given request (00de598)
  • response: added descriptive methods to make response like ok,unauthorized (b092407)
  • response: added sendView method to end the response immediately by sending view (1655667)
  • route: added options to add format to routes (cfe6c5c)
  • route-resource: added support for nested resources and resources filters (907014e)
  • routes: added middleware alias and added support for multiple params (51cf673)

Performance Improvements

  • config: remove auto-load with require-all for performance (806aae2)
  • env,file,helpers: improved initial datatypes to help v8 set hidden classes (79bd6b4)
  • middleware,route,server,session: improved variables initialization to keep v8 happy (20080ec)
  • request.format: added acceptance for request.format (4ed82c2)

2.0.8 (2016-01-29)

Bug Fixes

  • request: method is and accepts have been fixed to treat arrays (9d8e963)
  • session: fixed session manager to keep updated session payload within one request #88 (1fe8b4b), closes #88
  • session: now list of drivers is set to an empty object by default (3bb75e0)

Features

  • middleware: middleware now accepts runtime parameters (6907053)
  • package: passing coverage report to coveralls (579ab3e)
  • package.json: make the repository commitizen-friendly (0082c4a)
  • request: add match method to match an array of patterns to current url (a81a4f7)
  • request: added hasBody and format methods to request instance (30739db)
  • request: Added raw method to access raw data sent to a given request (00de598)
  • response: added descriptive methods to make response like ok,unauthorized (b092407)
  • response: added sendView method to end the response immediately by sending view (1655667)
  • route: added options to add format to routes (cfe6c5c)
  • route-resource: added support for nested resources and resources filters (907014e)
  • routes: added middleware alias and added support for multiple params (51cf673)

Performance Improvements

  • config: remove auto-load with require-all for performance (806aae2)
  • env,file,helpers: improved initial datatypes to help v8 set hidden classes (79bd6b4)
  • middleware,route,server,session: improved variables initialization to keep v8 happy (20080ec)
  • request.format: added acceptance for request.format (4ed82c2)

2.0.7 (2016-01-17)

Bug Fixes

  • request: method is and accepts have been fixed to treat arrays (9d8e963)
  • session: now list of drivers is set to an empty object by default (3bb75e0)

Features

  • package.json: make the repository commitizen-friendly (0082c4a)
  • request: add match method to match an array of patterns to current url (a81a4f7)
  • request: Added raw method to access raw data sent to a given request (00de598)

2.0.6 (2016-01-16)

docs

  • docs: add CONTRIBUTING.md file (ab7afdb)
  • docs: update the build badge to get the status from master branch (9c5c61f)

  • add trello badge (7c57fe3)

  • Config provider now only reads .js files (dcc7aee)
  • correct all license date (9f5fd24)
  • delete lowercase readme (6c12f92)
  • Improved tests coverage (07efb17)
  • Merge branch 'master' of github.com:adonisjs/adonis-framework (2eaa793)
  • Merge branch 'release-2.0.3' into develop (d5a3cb4)
  • Merge branch 'release-2.0.4' (c4405bf)
  • Merge pull request #42 from alexbooker/patch-1 (9a2d4be)
  • Merge pull request #45 from RomainLanz/develop (643ff72)
  • Merge pull request #46 from adonisjs/revert-42-patch-1 (c7e6471)
  • Merge pull request #47 from RomainLanz/develop (27cb1d5)
  • Merge pull request #48 from RomainLanz/develop (949a06f)
  • Merge pull request #61 from RomainLanz/feature/improving-readme (0dbafa8)
  • Merge pull request #63 from RomainLanz/update-readme-badges (c52f989)
  • Merge pull request #64 from RomainLanz/update-lodash (bcaf01a)
  • Merge pull request #65 from RomainLanz/contributing (4f5fd0b)
  • Merge pull request #67 from RomainLanz/commitizen (ff6d94f)
  • Merged release 2.0.5 (222bab7)
  • Moved route resolution to callback method, required for method spoofing (839791a)
  • new readme version (81169c9)
  • Now all files are dependent upon config directory and not reading from .env file (f2ff04f)
  • Now param method accepts a default value (adcd7fb)
  • npm version bump (0b6693e)
  • npm version bump (0d6b456)
  • Revert "Updated the licence date" (102ad50)
  • update license date and add license file (2aa3412)
  • update shields badges (6e932f5)
  • Updated the licence date (e881bd6)

feat

  • feat(package.json): make the repository commitizen-friendly (0082c4a)
  • feat(request): add match method to match an array of patterns to current url (a81a4f7)
  • feat(request): Added raw method to access raw data sent to a given request (00de598)

refactor

  • refactor: update lodash to 4.0.0 (ad1cbdc)
  • refactor(response): Capitalized x-powered-by (ed3d3dc)
  • refactor(server): Increased static server priority over route handler (30cfe41)
  • refactor(session): improved session drivers handling and exposing session manager (a17a49b)