Giter Site home page Giter Site logo

family-tree's Introduction

Family Tree

This application servers simple http servers which takes json post payload, based on the given json payload png family tree will be created and returned.

Install Packages

npm i

Run server

node server.js

Test in Browser

http://localhost:8080/test

If you wanted to change the json data for the test purpose, modify following in the file server.js

 body = '[{"key":0,"n":"Aaron"," ......

Request Sample

POST http://localhost:8080/
Content-Type: application/json

[{"key":0,"n":"Aaron","s":"M","m":-10,"f":-11,"ux":1,"a":["C","F","K"]},{"key":1,"n":"Alice","s":"F","m":-12,"f":-13,"a":["B","H","K"]},{"key":2,"n":"Bob","s":"M","m":1,"f":0,"ux":3,"a":["C","H","L"]},{"key":3,"n":"Barbara","s":"F","a":["C"]},{"key":4,"n":"Bill","s":"M","m":1,"f":0,"ux":5,"a":["E","H"],"birth":1},{"key":5,"n":"Brooke","s":"F","a":["B","H","L"]},{"key":6,"n":"Claire","s":"F","m":1,"f":0,"a":["C"],"birth":1,"identical":7},{"key":7,"n":"Carol","s":"F","m":1,"f":0,"a":["C","I"],"birth":1},{"key":72,"n":"Tweedledee","s":"M","m":1,"f":0,"a":["C","I"],"birth":2},{"key":73,"n":"Tweedledum","s":"M","m":1,"f":0,"a":["C","I"],"birth":2},{"key":8,"n":"Chloe","s":"F","m":1,"f":0,"vir":9,"a":["E"]},{"key":9,"n":"Chris","s":"M","a":["B","H"]},{"key":10,"n":"Ellie","s":"F","m":3,"f":2,"a":["E","G"]},{"key":11,"n":"Dan","s":"M","m":3,"f":2,"a":["B","J"]},{"key":12,"n":"Elizabeth","s":"F","vir":13,"a":["J"]},{"key":13,"n":"David","s":"M","m":5,"f":4,"a":["B","H"]},{"key":14,"n":"Emma","s":"F","m":5,"f":4,"a":["E","G"]},{"key":15,"n":"Evan","s":"M","m":8,"f":9,"a":["F","H"]},{"key":16,"n":"Ethan","s":"M","m":8,"f":9,"a":["D","K","S"]},{"key":17,"n":"Eve","s":"F","vir":16,"a":["B","F","L","S"]},{"key":18,"n":"Emily","s":"F","m":8,"f":9},{"key":19,"n":"Fred","s":"M","m":17,"f":16,"a":["B"]},{"key":20,"n":"Faith","s":"F","m":17,"f":16,"a":["L"]},{"key":21,"n":"Felicia","s":"F","m":12,"f":13,"a":["H"]},{"key":22,"n":"Frank","s":"M","m":12,"f":13,"a":["B","H"]},{"key":-10,"n":"Paternal Grandfather","s":"M","m":-33,"f":-32,"ux":-11,"a":["A"]},{"key":-11,"n":"Paternal Grandmother","s":"F","a":["E"]},{"key":-32,"n":"Paternal Great","s":"M","ux":-33,"a":["F","H"]},{"key":-33,"n":"Paternal Great","s":"F"},{"key":-40,"n":"Great Uncle","s":"M","m":-33,"f":-32,"a":["F","H"]},{"key":-41,"n":"Great Aunt","s":"F","m":-33,"f":-32,"a":["B","I"]},{"key":-20,"n":"Uncle","s":"M","m":-11,"f":-10,"a":["A"]},{"key":-12,"n":"Maternal Grandfather","s":"M","ux":-13,"a":["D","L"]},{"key":-13,"n":"Maternal Grandmother","s":"F","m":-31,"f":-30,"a":["H"]},{"key":-21,"n":"Aunt","s":"F","m":-13,"f":-12,"a":["C","I"]},{"key":-22,"n":"uncle","s":"M","ux":-21},{"key":-23,"n":"cousin","s":"M","m":-21,"f":-22},{"key":-30,"n":"Maternal Great","s":"M","ux":-31,"a":["D","J"]},{"key":-31,"n":"Maternal Great","s":"F","m":-50,"f":-51,"a":["B","H","L"]},{"key":-42,"n":"Great Uncle","s":"M","m":-30,"f":-31,"a":["C","J"]},{"key":-43,"n":"Great Aunt","s":"F","m":-30,"f":-31,"a":["E","G"]},{"key":-50,"n":"Maternal Great Great","s":"F","ux":-51,"a":["D","I"]},{"key":-51,"n":"Maternal Great Great","s":"M","a":["B","H"]}]

Sample png output

Sample Family Tree

Reference

  1. https://gojs.net/latest/intro/serverSideImages.html
  2. https://gojs.net/temp/genogramTwins.html

family-tree's People

Contributors

paneru-rajan avatar

Watchers

 avatar  avatar

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.