Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 1.88 KB

README.md

File metadata and controls

61 lines (45 loc) · 1.88 KB

CRUD-Adonis-Nuxt-Server

CRUD-Adonis-Nuxt-Server is an prototype API to create a easy and simple "Shop" with some feature which allow you to add product, or buy others. This project is used to my frontend prototype CRUD-Adonis-Nuxt-Front.

Features

Products Features

Feature Coded Description
Add Product Add a Product on DataBase
List Products Listing all Products
Edit Product Editing a Product to change values
Delete Product Removing a Product from Database

User Features

Feature Coded? Description
Login Allow User to be connected
LogOut Allow User to be disconnected
Register Allow Guest to create an Account
Rules Allow specific actions for specific Users

Routes

Available routes

Route.group(() => {
  Route.get('/getproducts', 'ProductsController.getProducts')
  Route.get('/getproduct', "ProductsController.getOneProduct")
  Route.post('/updateproduct', "ProductsController.updateProduct")
  Route.post('/deleteproduct', "ProductsController.deleteProduct")
  Route.post('/storeproduct', "ProductsController.storeOneProduct")
  Route.post('/storeproducts', "ProductsController.storeProducts")

  Route.post("login", "AuthController.login");
  Route.post("register", "AuthController.register");
  Route.get("me", "AuthController.me").middleware('auth')
}).prefix('api')

Technologies

  • AdonisJS (NodeJS Framework --> Backend)
  • Postgre SQL (SGBDR)

How to build setup

# install dependencies
$ npm install

# serve with hot reload at localhost:3333
$ node ace serve --watch

# build for production and launch server
$ node ace build