/ignitedev

Ignite backend developer test

Primary LanguageTypeScript

AdonisJS App

Welcome to your AdonisJS app! This README provides details on how to set up, run, test, and work with the application.

Table of Contents

Prerequisites

Before you begin, ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/your-adonis-app.git
  2. Navigate to the project directory:

    cd your-adonis-app
  3. Install dependencies:

    npm install

Usage

To run the app in development mode:

npm run dev

This will start the development server, and you can access the app at http://localhost:3333.

For production, you can build the app and start the server:

npm run build
npm start

Testing

Run tests using:

npm test

For test coverage:

npm run test:coverage

Linting

Lint your TypeScript files with:

npm run lint

Dockerized Database

For database operations using Docker:

  • Start the database:
npm run infra:up
  • Stop the database:
npm run infra:down

Available Scripts

  • npm run dev: Start the development server with watch mode.
  • npm run build: Build the app for production.
  • npm start: Start the app in production mode.
  • npm test: Run tests.
  • npm run test:coverage: Run tests with coverage using NYC.
  • npm run lint: Lint TypeScript files.
  • npm run format: Format files using Prettier.
  • npm run infra:up: Start the Dockerized database.
  • npm run infra:down: Stop the Dockerized database.

API Documentation

After running the application, check the swagger documentation on

GET /docs