Skip to content
Peter Lam edited this page Feb 15, 2019 · 17 revisions

Adonis

Prerequisites

  • Install Node.js here

  • Install Yarn here

  • Install Adonis with yarn add global @adonisjs/cli

CMD

Within the directory /Jasper write the following to install all dependencies:

  • yarn install

Running The Application

To start the application run

  • yarn start or adonis serve if you have Adonis installed

To run test if your code meets coding coventions

  • run yarn lint

SQLite

  1. Download the database file and place it under the <App root directory>/database folder.

  2. Make sure your .env has the following lines:

DB_CONNECTION=sqlite
DB_DATABASE=jasper_dev

Migration

  • Run adonis migration:run to generate the tables.
  • Run adonis migration:rollback to purge the tables.

Sqlite shell (Optional)

Windows(64-bit)

  1. Download the binaries and the command line tool and place them under C:\Windows\System32
  2. Open a command line tool from the <App root directory>/database and run sqlite3 jasper_dev.db

References


ESLint

VSCode

  • Go to extentions and download "ESLint"

Manual Testing

  • Type yarn lint

Ignoring ESLint [Not Recommended]

  • For in line use: // eslint-disable-line
  • For the whole file use: eslint no-use-before-define: 0 */ // --> OFF

References

Clone this wiki locally