SondosElMoataz / Backend_Task

A backend task where I need to create a mysql database for document tracking system in addition to a mini task of CRUD operations for a simple customer DB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I have used Xampp control for mysql server

after installing xampp you can easily start both services Apache and MySQL for the server to be up and running on the localhost

You can then access it using

https://localhost/phpmyadmin/

To create the databases using the given procedure

open SQL tab and paste the following:

DROP DATABASE IF EXISTS document_tracking_system;

CREATE DATABASE document_tracking_system;

-Select your newly created Database document_tracking_system -then go to Import tab -Choose the file named doc_track_creation -Go

Now your stored procedure has been imported

-Go to Routines tab -Check the procedure called DOC_TRACK_CREATION and click on execute

Your database document_tracking_system has been created successfully

Now to create the flask database for the application

-Select New on the top of the left panel where all your databases exist -Select SQL tab from the top panel -paste the following:

DROP DATABASE IF EXISTS flask;

CREATE DATABASE flask;

CREATE TABLE customer( name varchar(255) NOT NULL , age int NOT NULL, user_id bigint PRIMARY KEY AUTO_INCREMENT);


To run your application:

-go to your terminal and run the following: pip install flask

pip install flask_mysqldb

  • go to the directory when you cloned the repo and run:

flask run

Now your app is running on port 5000

go to http://localhost:5000/ you can now add new customers by giving a name and age edit and delete as appears beside the customers

endpoints are as follows:

-DELETE: /delete/ -UPDATE: /update/ -ADD: /add -GET: /

About

A backend task where I need to create a mysql database for document tracking system in addition to a mini task of CRUD operations for a simple customer DB


Languages

Language:Python 66.7%Language:HTML 33.3%