Web application produces the system, working with products, stocks and shops resources.
Server side technologies stack:
- Java 8
- Spring Boot (Security, Data Jpa, Web)
- JWT (As a security base point)
- Hibernate Jpa
- PostgreSQL
Client: Angular 4.
Build tools:
- Gradle
- Webpack
Installing environment (You need Java 8 installed):
-
Download Gradle
Unpack and set path in the environment variable Path to foler /bin.
-
Download PostgreSQL from official site or from docker hub:
docker pull postgres:latest
-
Download NodeJS with npm.
-
Clone project from this repository.
-
Start PostgreSQL, docker command:
docker run --name postgres -v /opt/db/postgres:/var/lib/postgresql/data -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=root -e POSTGRES_DB=postgres -p 5432:5432 -d postgres
-
Change(if needed) in
application.properties
project properties, exactly:
- URL and port to your database
- username
- password
- secret security key
Run backend:
- Manually:
-
Go to the server package
cd server/
-
Run the command
gradle jar
,java -jar build/libs/product-management-system.jar
or justgradle bootRun
- With docker:
-
Go to server directory:
cd server/
-
Build server jar, using gradle command:
gradle clean build
-
Build an image:
docker build -t pms-image .
-
Start docker container:
docker run --name pms-server --link postgres -p 8080:8080 -d pms-image
Run client:
- In console, go to the project root root.
cd client/
npm i
npm start
To run server tests use command: gradle test
To run client tests go to client
folder in project and use command:
npm run selen-update
npm run selen
npm run test
To debug the client use npm run server
to run Webpack DevServer (port :3000)
- Logs save to dir
/server/log/pms/general.YYYY-MM-DD.log
.