Skip to content

Latest commit

 

History

History
139 lines (101 loc) · 3.89 KB

README.md

File metadata and controls

139 lines (101 loc) · 3.89 KB

Logo

Project management API developed with AdonisJS V4 (Rocketseat bonus module)

GitHub top language Made by Repository size GitHub last commit Repository issues GitHub

About the project   |    Getting started   |    License

Run in Insomnia

👨🏻‍💻 About the project

This is an API Rest to manage project and tasks where I have learned about the main features in AdonisJS.

The main topics covered were:

  • Concept and structure
  • Setting ESlint
  • Database (Lucid ORM)
  • User registration
  • JWT Auth
  • Recover password
  • Send e-mail
  • Reset password
  • File upload
  • Show files (static route)
  • Creating models
  • Relations
  • CRUD
  • Validator
  • Handle exception
  • Internationalization
  • Pagination
  • Hook
  • Queue using Redis (Kue)
  • Setting Sentry
  • Deal with CORS
  • Database transaction

💻 Getting started

Import the Insomnia.json on Insomnia App or click on Run in Insomnia button

Requirements

Clone the project and access the folder

$ git clone https://github.com/felipeDS91/adonisJS.git && cd adonisJS

Follow the steps below

# Install the dependencies
$ npm install

# Creates a docker container for REDIS
$ docker run --name redis -p6379:6379 -d redis:alpine

# Creates a docker container or use your own mysql installation (changes the password)
$ docker run --name adonis  -e MYSQL_ROOT_PASSWORD="mysql_password" -p 3306:3306 -d mysql:5.7.30

# Creates a new mysql user (changes the username and password)
# To connect with mysql database you can use a tool like DBeaver for example
$ CREATE USER 'docker'@'localhost' IDENTIFIED BY 'docker';

# Create a database
$ CREATE DATABASE adonis;

# Give privileges for the created user 
$ GRANT ALL PRIVILEGES ON adonis.* TO 'docker'@'localhost';

# Refresh the privileges
$ FLUSH PRIVILEGES

# Make a copy of '.env.example' to '.env'
# and set with YOUR environment variables
$ cp .env.example .env

# Run the migrations
$ adonis migration:run

# Run this command to start the server in development mode
$ adonis serve --dev

# If you want, rRun this command to start the kue worker
$ adonis kue:listen

# Well done, project is started!

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with 💜  by Felipe Douglas 👋 See my linkedin