This is a react.js application to manage contacts. The contacts are stored in a postgresql database and are displayed on a map.
There are two different user roles. As admin you are able to add, update und delete contacts. As normal user you only can see the public stored contacts. Contacts can be stored as private and as public. Public contacts are visible for all users. Private contacts are only visible for admin users.
The postgresql database should have two tables ("users" and "contacts"):
- users (username varchar primary key, password varchar, isadmin bool)
- contacts (forename varchar, name varchar, street varchar, postId int, town varchar, country varchar, id int primary key, isprivate bool, latitude varchar, longitude varchar);
The easiest way is using docker-compose:
- clone repository
- run "docker-compose up"
- visit http://localhost:8081 in your webbrowser
Alternatively you can build the application manually:
- setup a postgresql database
- create tables mentioned in "Database" section
- edit database settings in *.js modules
- cd to "webdev_rest" directory and run "node index.js"
- cd to root directory of cloned repository and run "npm start"