Giter Site home page Giter Site logo

test_task's Introduction

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

test_task's People

Contributors

danillo19 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.