Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

test_task

Simple React + Spring web app.

Table of contents

Introduction

Simple React + Spring Boot + MySQL (inside docker container) web application, where you can create/update/delete/get banners/categories and search by their names.

Requirements

App can be run locally, requirements a listed below.

Local

Quick start

Configure database

Build docker image

$ cd backend
$ docker build -t test_task .

Start container with environment arguments.

$  docker run -d --name <container_id> -p 3306:3306 -e MYSQL_ROOT_PASSWORD=<password> -e MYSQL_DATABASE=<db_name> test:latest

By default app works with MYSQL_ROOT_PASSWORD=secret and MYSQL_DATABASE=mySchema. If you change it, don't forget to change them in application.properties too. MySql database started on port 3306 (you can specify external port :)).

 $ docker run -d --name test_task -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=mySchema test_task:latest

Start the backend

(inside backend directory)

$ mvn clean package
$ java -jar target/backend-0.0.1-SNAPSHOT.jar

Spring boot aplication has been started on port 8080 (you can specify it in application.properties)

Start the frontend

In another terminal :)

$ cd frontend
$ npm install
$ npm run start

Frontend has been started on port 3000 . You can see it in browser on localhost:3000/sign_in

How to work with it

By default only /bid endpoint is public. In database was preloaded default user(admin) with username: admin and password: admin to pass autentication and access private /banner/* and /category/* endpoints.

Screenshots

image image image image

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages