Giter Site home page Giter Site logo

adonis-atelier-etienne's Introduction

Atelier initiation AdonisJS par Etienne Rouzeaud

Pré-requis (Database)

Pour faire fonctionner cette app (résultat de l'atelier de Etienne), vous avez besoin de 2 bases de donnée PostgreSQL (une pour le dev et une pour les tests)

Afin de connecter les 2 bases, vous devez créer et renseigner 2 fichiers :

.env

HOST=127.0.0.1
PORT=3333
APP_URL=http://${HOST}:${PORT}
NODE_ENV=development
CACHE_VIEWS=false
APP_KEY=trestessecretkeypourauthentification
DB_CONNECTION=pg
DB_HOST=127.0.0.1
DB_PORT=5432
DB_USER=VOTRE_DB_USER
DB_PASSWORD=VOTRE_DB_PWD
DB_DATABASE=VOTRE_DB_NAME

.env.testing

HOST=127.0.0.1
PORT=4000
NODE_ENV=testing
DB_CONNECTION=pg
DB_HOST=127.0.0.1
DB_PORT=5432
DB_USER=VOTRE_DB_USER
DB_PASSWORD=VOTRE_DB_PWD
DB_DATABASE=VOTRE_DB_NAME_DE_TEST

Setup

$ npm i -g @adonisjs/cli

$ npm install

$ adonis migration:run

Start

$ adonis serve dev

Test

$ adonis test


Adonis API application

This is the boilerplate for creating an API server in AdonisJs, it comes pre-configured with.

  1. Bodyparser
  2. Authentication
  3. CORS
  4. Lucid ORM
  5. Migrations and seeds

Setup

Use the adonis command to install the blueprint

adonis new yardstick --api-only

or manually clone the repo and then run npm install.

Migrations

Run the following command to run startup migrations.

adonis migration:run

adonis-atelier-etienne's People

Contributors

davidostermann avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.