Welcome to the Library management System API. This API is to manage book checkouts and details.
Please follow the instructions that follow.
The project can either be installed on a linux server or a windows server given the choice of the operating system from the above.
If you have Git download the project by opening a command prompt (cmd) in the www or htdocs of the local server and start Apache & MySQL. Clone the repo as this
git clone https://gitlab.com/epione-tests/brunonicholas-be.gitor download the folder and extract the file in the server directory environment
The default link for the app is
http://localhost/api/or if run in a development environment
http://localhost:PORT_NUMBER/api/or when in a windows local server
http://localhost/public/api/Make sure you have your local server working well, for instance LAMP for Linux e.g Ubuntu. Find out how to run Laravel installation on Apache server and know the name of YOUR_FOLDER from which you will call the project after clonning it in the example above for windows installation.
http://localhost/YOUR_FOLDER/api/Likewise you might use the artisan command on the internal Laravel server as and
composer install
composer update
php artisan serve --port 5000NB: You can either exclude --port 5000 for the default port 8000 or use any available of choice. In this case, here is the url
http://localhost:5000/api/Next step is to configure the project. Locate the .env.example, copy all its content and create a new file called .env and update these Fields to your created database name.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=YOUR_DB
DB_USERNAME=YOUR_USERNAME
DB_PASSWORD=YOUR_PASSWORDeither use the bash command to use a fresh database
php artisan migrate:fresh --seed
php artisan passport:installMake sure to create the App Security Key which is automatically generated with this command
php artisan key:generate This API is intended for examination purposes and not meant for production of any kind.
| Request | Route | Category |
|---|---|---|
| GET | http://localhost:5000/api/users |
Users |
| GET | http://localhost:5000/api/books |
Books |
| GET | http://localhost:5000/api/userbooks |
Users with books |
| Request | Route | Category |
|---|---|---|
| GET | http://[THE LINKS ON [Getting All]]/1 |
One Item |
NB: 1 in the route above can be any number of choice
| Request | Route | Category |
|---|---|---|
| POST | http://[THE LINKS ON [Getting All]] |
Add Item |
NB: You can test this with Postman for all routes put there, make sure you made the Configuration correctly.. This route needs authentication with token.
| Request | Route | Category |
|---|---|---|
| PUT | http://[THE LINKS [Getting All]]/1 |
Edit Item |
NB: 1 in the route above can be any number of choice, make sure you made the Configuration. This route needs authentication.
| Request | Route | Category |
|---|---|---|
| DELETE | http://[THE LINKS [Getting All]]/1 |
Delete Item |
NB: 1 in the route above can be any number of choice, make sure you made the Configuration. This route needs authentication.
You use this to access the protected endpoints
| Request | Route | Category |
|---|---|---|
| GET | http://localhost:5000/api/auth/user |
Auth user |
| POST | http://localhost:5000/api/auth/login |
Login |
| POST | http://localhost:5000/api/auth/logout |
Logout |
This project is designed to be a web application that is sstaged into the following:
- The API
This repo is intended fo the API and so endpoints, data and JWT are expected here
- The Frontend
It is mainly of a fron-end framework that persues to consume this API.
This is a Test Application is of the MIT License but strictly a property of OWNERS as referenced by Bruno Nicholas.