Skip to content

aboudard/springboot-ngrx-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
Apr 12, 2018
Feb 24, 2020
Feb 13, 2020
Apr 12, 2018
Feb 23, 2020
Apr 12, 2018
Apr 12, 2018
Nov 20, 2018

Repository files navigation

springboot-ngrx-data

Spring Boot with NgRx Data in Angular 8 This project demonstrates the use of Spring Boot with Angular 8 and NgRx Data lib on top of NgRx. Find the lib here : https://ngrx.io/guide/data

Install

Clone this repository

git clone https://github.com/aboudard/springboot-ngrx-data
cd springboot-ngrx-data

The demo app is based on the Angular CLI. You may want to install the CLI globally if you have not already done so.

npm install -g @angular/cli

Install the npm packages

cd src/angular
npm install

Runnning

Just run the build (in watch mode if you plan to work on sources)

ng build --dev --watch

Now run the Spring Boot server

mvn spring-boot:run
or
mvn spring-boot:start

Open your localhost http://localhost:8080

Alternative with json-server

If you want to use the json server mock database just follow these instructions :

  • Install json-server
npm install -g json-server
  • Kill the Spring server we will use the Angular Cli
  • Run the commands :
cd src/angular
npm run start
npm run dbmock

Open your localhost http://localhost:4200

  • Be sure the root path is correct in the /store/app-store.module.ts file :
// TODO : change this config when using json-server or Spring Boot Data
const defaultDataServiceConfig: DefaultDataServiceConfig = {
  root: 'api'
};

Follow the original instructions about NgRx Data

Check the original instructions about monitoring with Redux Devtools and other details