Skip to content

Franweb79/00.rest-api-with-slim-4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS IS A SIMPLE REST API BUILT WITH SLIM 4 FRAMEWORK

This API is intended to be used with learning purposes, and maybe as general backend for future projects

You can check it on production here: http://rest-api-with-slim-4.avanzartewebs.com/

  1. on .gitignore we will ignore the following folders
    • docs - because are guides or notes only interesting for a personal use
    • vendor - because it would make sync much bigger. All those files can be downloaded and installed again through the command "composer install", once composer is installed on your equip. for more info please check https://getcomposer.org/
    • As we have obfuscated some of the .js files, the non obfuscated files folder will also be added here
    • The .sql files are of course development versions with fake data connection, the class to connect to database here is of course also a development version. Production version file will be added to .gitignore as well. Latest .swl file is the one with events to add scheduled tasks
  2. Scheduled tasks are made to reset database once per day, so you can play with it with no problem :) . As they don´t work on my shared server because it would lead to security problems, I did it with CRON jobs.
  3. To be improved on next versions:
    • config/Item-model.php: for now will only be used a method to insert new items, and will be called on the post-new-item-control.php but maybe in the future we could create methods to getItem (get one item) and getItems (get all items), now that code is done on each route designed for each of those tasks. Maybe that way will be more clean code.
    • Also regarding the routes to get all items and one item, now they are opened on a new tab which only shows JSON formatted data. In the future, maybe open them on same tab,with styles and a back button to make navigation more comfortable, like we do now to post a new item.
    • Add possibility of making a request through software like postman.

all rights reserved

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published