Giter Club home page Giter Club logo

pictet-technologies-open-source / reactive-todo-list-r2dbc Goto Github PK

View Code? Open in Web Editor NEW
40.0 7.0 32.0 4.94 MB

Sample reactive application using Angular, Spring Boot, Spring Webflux, Spring Data R2DBC and PostgreSQL. It also demonstrates the notification feature of PostgreSQL (listen/notify)

License: MIT License

Shell 0.43% Dockerfile 0.26% Java 62.42% JavaScript 1.84% TypeScript 27.16% HTML 4.86% SCSS 2.42% PLpgSQL 0.60%
reactive-programming r2dbc r2dbc-postgresql postgresql webflux spring-boot spring-data spring-data-r2dbc angular postgresql-notify postgresql-listen optimistic-locking collaborative server-sent-event

reactive-todo-list-r2dbc's Introduction

CircleCI CodeFactor License: MIT

Made with Love by Pictet Technologies LinkedIn

Medium

Reactive Todo List with PostgreSQL and Spring Data R2DBC

This project aims to explain how to build a fully reactive application with Spring Boot, Spring Webflux, Angular, PostgreSQL and Spring Data R2DBC. It demonstrates how to deal with concurrent modifications using optimistic locking, PostgreSQL Listen/Notify and Server Sent Events.

Project structure

Folder Description
docker Contains the docker-compose.yml used to setup the application
todo-list-application Spring boot application (back-end)
todo-list-ui Angular application (front-end)

Local environment

Build the application

In order to build the application you need to have the following softwares installed:

  • open JDK or oracle JDK >= 8
  • docker & docker compose
  • npm
$ build.sh

Start the application

$ start.sh

Once the application is started you can access it using the following links :

Name Link
UI http://localhost:8080
Swagger UI http://localhost:8080/swagger-ui/#/item-controller
PgAdmin http://localhost:5050/

If you only want to start postgres, execute the following command

$ start.sh -postgres-only

Configure PgAdmin (PostgreSQL web Client)

Login to PgAdmin: http://localhost:5050/

Create a connection

  • Server: postgres
  • Database name: todolist
  • User: admin
  • Password: password

Stop the application

$ stop.sh

Production environment

Build the application

You need to have docker installed to build the application.

Ensure that the URL of the application has been correctly configured in the following file.

todo-list-ui/src/app/environments/environment.prod.ts

Then build the application in production mode.

$ mvnw clean install -Pprod

reactive-todo-list-r2dbc's People

Contributors

alexandre-jacquot-ptl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

reactive-todo-list-r2dbc's Issues

URL https://artifactory.pictet.io not reacheable

Hello,

I got the following error when trying to build the todo-list-ui project:

npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://artifactory.pictet.io/artifactory/api/npm/npm/zone.js/-/zone.js-0.10.3.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.pictet.io
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in:

Getting exception while connecting to PostGres

2022-02-01 14:04:28.885 ERROR 1 --- [io-8080-exec-10] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Failed to obtain R2DBC Connection; nested exception is io.r2dbc.postgresql.PostgresqlConnectionFactory$PostgresConnectionException: Cannot connect to 127.0.0.1:5432] with root cause

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.