Skip to content

epg01/Crud-Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API-CRUD-GO-AND-REACT

LinkedIn

Table of Contents
  1. About The Project
  2. Getting Started

About The Project

Creation of a simple web application to record the data of a certain person and you can even search the database if there is a certain user.

Built With

The back-end part is built with the following technologies

The front-end part is built with the following technologies.

Getting Started

Prerequisites

Have Go, React and Docker installed.

local installation.

Once the repository is cloned: git clone https://github.com/epg01/PruebaTecnica

We proceed to execute our docker compose that is located in the root of our folder called PruebaTecnica

sudo docker-compose up -d

then we execute the sudo docker-compose ps command to be able to see if the containers are mounted correctly and without any coming out. It should appear something like this

Name Command State Ports
back sh -C while true; do sleep ... up 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp
front docker-entrypoint.sh /bin/ ... up 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp
mysqlDB docker-entrypoint.sh mysql up 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp

If all our containers have the Status as Up, it is because they were created successfully 💙 Then we have to proceed to manually start our server in the back container, we enter our container back writing the following command

sudo docker-compose exec -it backend bash

once entered our back container, we execute the binary file that was generated when the back container was created, executing the following command.

./Back-End

Where if it runs successfully (how it should be if all of our containers ran successfully)

Server listening on port = 8000

Finally we can open our browser of preference by typing the following URL.

htpp://localhost:3000/

And finally we have our fully functional CRUD API

Contact

Your Name - @SixTanDeveloper - sixtandev@gmail.com

Project Link: Technical test