SamJoyce / SUTDitor

0 stars 0 forks source link

Static views of the discussed pages #1

Open stanleynguyen opened 8 years ago

stanleynguyen commented 8 years ago
stanleynguyen commented 8 years ago

@PandaRider please put html files into the /views folder, css to /views/public/css, and js to /views/public/js

stanleynguyen commented 8 years ago
stanleynguyen commented 8 years ago

http://bl.ocks.org/d3noob/9662ab6d5ac823c0e444 resource for 3d tree with images

stanleynguyen commented 8 years ago

@verina09, I've created a few endpoints:

GET '/api/tree' provided param 'id' will return you a tree GET'/api/tree/all' will return all trees in database POST '/api/tree' provided 3 params 'name', 'date', 'src' (for the root node) will create a new tree and return the new tree in response

GET '/api/node' provided param 'id' will return you a corresponding node POST '/api/node' provided 5 params 'name', 'date', 'src', 'parents', 'sourceTree' will create a new node and append it to the tree, will return a success message with status 200.

verina09 commented 8 years ago

ok @stanleynguyen let me test these APIs in the few days

meanwhile, can you work on/researching on saving the image on the tree/database? currently I just put the simple way of appending URL of image. but of course we also want to try on how to save the image in the database itself. 2 formats we want to look at: SVG (text based) and JPEG (image based).