You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by hb...@apache.org on 2023/01/11 00:11:24 UTC

[age-viewer] branch main updated: Updated Readme (#100)

This is an automated email from the ASF dual-hosted git repository.

hbshin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/age-viewer.git


The following commit(s) were added to refs/heads/main by this push:
     new a82c5e3  Updated Readme (#100)
a82c5e3 is described below

commit a82c5e3e098950c9b8952d01540d4e50fb2110a8
Author: Sarthak <69...@users.noreply.github.com>
AuthorDate: Wed Jan 11 05:41:19 2023 +0530

    Updated Readme (#100)
    
    Updated the readme file for setting up development environment for contributors.
---
 README.md | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 84 insertions(+), 20 deletions(-)

diff --git a/README.md b/README.md
index e3b1556..555b5ef 100644
--- a/README.md
+++ b/README.md
@@ -4,31 +4,95 @@
   <a href="https://github.com/apache/age/stargazers">
     <img src="https://img.shields.io/github/stars/apache/age-viewer"/>
 </p>
-  
-# Goal of Apache AGE Viewer
 
-Apache AGE Viewer is graph visualisation tool, for Apache AGE. 
-This is a sub-project of [the Apache AGE project](https://age.apache.org/#).
+# What is Apache-Age Viewer
+Apache-Age Viewer is a web based user interface that provides visualization of graph data stored in a postgreSQL database with AGE extension. 
+It is graph visualisation tool, for Apache AGE.
 
+This is a sub-project of [the Apache AGE project](https://age.apache.org/#).
 
 # Recommend Node Version & install module
-- node js 14.16.0
-- npm install pm2
-
-# How to run using command
-```
-npm run setup
-npm run start
-```
+
+- Node version - ^14.16.0
+
+- Node Module - pm2 
+
+Install latest **pm2** with :
+``` npm i pm2 ```
+
+
+> [pm2](https://www.npmjs.com/package/pm2) is an NPM module to run the project in production mode, and hence is optional for getting started with setting up development environment for Age-Viewer 
+
+# Running Age-Viewer
+
+ - Install the required node modules using  :  
+	```npm run setup```
+- Run Age-Viewer using : 
+```npm run start```
+
+>This will start the age-viewer on http://localhost:3000 if port 3000 is free.
+
+
 # How to build using command
-```
-npm run setup-backend
-npm run build-front
-npm run build-back
-pm2 stop ag-viewer-develop
-pm2 delete ag-viewer-develop
-pm2 start ecosystem.config.js
-```
+
+- Build the front-end : 
+```npm run build-front ```
+
+- Build the back-end :
+``` npm run build-back```
+
+- Start the project in production mode :
+  ``` 
+	pm2 stop ag-viewer-develop
+
+	pm2 delete ag-viewer-develop
+
+	pm2 start ecosystem.config.js
+
+	```
+
+  # How to start using Age-Viewer
+ - To start using Age-Viewer we need to have a running postgreSQL database server with Apache Age Extension 
+	 ### Setting up the PostgreSQL server with AGE extension
+	-  Easiest way  for Windows, Mac-OS and Linux Environment using **Docker**
+  
+	> Install docker in advance (https://www.docker.com/get-started), install the version compatible with your OS from the provided link.
+	
+	 **Run Using Docker** :
+   
+	- Get the docker image - 
+	```docker pull apache/age ```
+	
+	- Create AGE docker container
+		```console
+		docker run --name myPostgresDb -p 5455:5432 -e POSTGRES_USER=postgresUser -e POSTGRES_PASSWORD=pos  
+		tgresPW -e POSTGRES_DB=postgresDB -d apache/age
+		 ```
+	
+	| Docker variables| Description |
+	|--|--|
+	| ``--name`` | Assign a name to the container |
+	|	`-p` |	Publish a container’s port(s) to the host|
+	|	``-e``|	Set environment variables|
+	|	``-d``|	Run container in background and print container ID|
+- To Get the running log of the docker container created - 
+`` docker logs --follow myPostgresDb``
+- To Get into postgreSQL Shell - 
+`` docker exec -it myPostgresDb bash``
+- After logging into postgreSQL shell follow the [Post-Installation](https://github.com/apache/age#post-installation) instruction to create a graph in the database.
+### Connect Apache Age-Viewer to PostgreSQL Database
+**Initial Connection Layout**
+![enter image description here](https://user-images.githubusercontent.com/69689387/211624181-9644f489-1a45-4eed-ac8e-7aaf156b97ea.png)
+To Connect to postgreSQL server running from Docker Container
+- Connect URL - localhost
+- Connect Port - 5455 
+- Database Name - postgresDB
+- User Name - postgresUser
+- Password - postgresPW
+> The following field is same as used to make the docker container specified above as flags.
+
+
 
 # License
+
 Apache AGE Viewer is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.