diff --git a/.gitignore b/.gitignore index c2658d7..3e21bcc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ node_modules/ +regions/ +region-raw-image/ diff --git a/exps.json b/exps.json deleted file mode 100644 index 61bfc2b..0000000 --- a/exps.json +++ /dev/null @@ -1 +0,0 @@ -{"region-pin0-exp0":{"exp_id":"region-pin0-exp0","label":"region-pin0-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin0-exp1":{"exp_id":"region-pin0-exp1","label":"region-pin0-exp1","state":"current","start":"2016/11/14 21:47:46","end":"2016/11/14 22:24:21","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin0-exp2":{"exp_id":"region-pin0-exp2","label":"region-pin0-exp2","state":"current","start":"2016/11/14 21:31:18","end":"2016/11/14 22:42:19","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin1-exp0":{"exp_id":"region-pin1-exp0","label":"region-pin1-exp0","state":"current","start":"2016/11/14 20:09:56","end":"2016/11/15 00:16:08","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin2-exp0":{"exp_id":"region-pin2-exp0","label":"region-pin2-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin2-exp1":{"exp_id":"region-pin2-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin2-exp2":{"exp_id":"region-pin2-exp2","label":"Label only","content":"this is the text description","pin_id":null},"region-pin2-exp3":{"exp_id":"region-pin2-exp3","label":"region-pin2-exp3","state":"current","start":"2016/11/14 21:31:05","end":"2016/11/14 22:32:09","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin3-exp0":{"exp_id":"region-pin3-exp0","label":"Label only","content":"this is the text description","pin_id":null},"region-pin3-exp1":{"exp_id":"region-pin3-exp1","label":"region-pin3-exp1","state":"current","start":"2016/11/14 21:06:17","end":"2016/11/15 02:49:31","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin3-exp2":{"exp_id":"region-pin3-exp2","label":"region-pin3-exp2","state":"current","start":"2016/11/14 21:01:52","end":"2016/11/14 23:55:07","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin4-exp0":{"exp_id":"region-pin4-exp0","label":"region-pin4-exp0","state":"current","start":"2016/11/14 21:08:31","end":"2016/11/15 01:06:10","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin4-exp1":{"exp_id":"region-pin4-exp1","label":"region-pin4-exp1","state":"current","start":"2016/11/14 21:29:12","end":"2016/11/14 23:38:55","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin5-exp0":{"exp_id":"region-pin5-exp0","label":"region-pin5-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin5-exp1":{"exp_id":"region-pin5-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin5-exp2":{"exp_id":"region-pin5-exp2","label":"region-pin5-exp2","state":"current","start":"2016/11/14 20:17:16","end":"2016/11/15 01:34:25","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin5-exp3":{"exp_id":"region-pin5-exp3","label":"region-pin5-exp3","state":"current","start":"2016/11/14 20:00:28","end":"2016/11/15 02:08:07","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin6-exp0":{"exp_id":"region-pin6-exp0","label":"Label only","content":"this is the text description","pin_id":null},"region-pin6-exp1":{"exp_id":"region-pin6-exp1","label":"region-pin6-exp1","state":"current","start":"2016/11/14 21:51:46","end":"2016/11/14 22:50:20","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin7-exp0":{"exp_id":"region-pin7-exp0","label":"region-pin7-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin7-exp1":{"exp_id":"region-pin7-exp1","label":"region-pin7-exp1","state":"current","start":"2016/11/14 21:19:05","end":"2016/11/15 00:01:13","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin7-exp2":{"exp_id":"region-pin7-exp2","label":"region-pin7-exp2","state":"current","start":"2016/11/14 21:16:55","end":"2016/11/14 22:52:13","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin7-exp3":{"exp_id":"region-pin7-exp3","label":"region-pin7-exp3","state":"current","start":"2016/11/14 21:43:03","end":"2016/11/14 22:57:12","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin8-exp0":{"exp_id":"region-pin8-exp0","label":"region-pin8-exp0","state":"current","start":"2016/11/14 20:56:08","end":"2016/11/15 00:15:54","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin8-exp1":{"exp_id":"region-pin8-exp1","label":"region-pin8-exp1","state":"current","start":"2016/11/14 20:25:28","end":"2016/11/15 02:26:26","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin8-exp2":{"exp_id":"region-pin8-exp2","label":"region-pin8-exp2","state":"current","start":"2016/11/14 21:54:40","end":"2016/11/15 01:07:44","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin9-exp0":{"exp_id":"region-pin9-exp0","label":"region-pin9-exp0","state":"current","start":"2016/11/14 21:58:09","end":"2016/11/14 22:24:23","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin9-exp1":{"exp_id":"region-pin9-exp1","label":"region-pin9-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin9-exp2":{"exp_id":"region-pin9-exp2","label":"region-pin9-exp2","state":"current","start":"2016/11/14 20:59:44","end":"2016/11/14 23:39:29","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin9-exp3":{"exp_id":"region-pin9-exp3","label":"region-pin9-exp3","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin10-exp0":{"exp_id":"region-pin10-exp0","label":"Label only","content":"this is the text description","pin_id":null},"region-pin11-exp0":{"exp_id":"region-pin11-exp0","label":"region-pin11-exp0","state":"current","start":"2016/11/14 20:36:44","end":"2016/11/14 22:54:32","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin11-exp1":{"exp_id":"region-pin11-exp1","label":"region-pin11-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin12-exp0":{"exp_id":"region-pin12-exp0","label":"region-pin12-exp0","state":"current","start":"2016/11/14 20:08:26","end":"2016/11/15 00:46:02","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin12-exp1":{"exp_id":"region-pin12-exp1","label":"region-pin12-exp1","state":"current","start":"2016/11/14 20:02:39","end":"2016/11/15 02:25:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin12-exp2":{"exp_id":"region-pin12-exp2","label":"region-pin12-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin13-exp0":{"exp_id":"region-pin13-exp0","label":"region-pin13-exp0","state":"current","start":"2016/11/14 21:32:46","end":"2016/11/15 01:10:37","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin13-exp1":{"exp_id":"region-pin13-exp1","label":"region-pin13-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin13-exp2":{"exp_id":"region-pin13-exp2","label":"Label only","content":"this is the text description","pin_id":null},"region-pin13-exp3":{"exp_id":"region-pin13-exp3","label":"Label only","content":"this is the text description","pin_id":null},"region-pin14-exp0":{"exp_id":"region-pin14-exp0","label":"region-pin14-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin14-exp1":{"exp_id":"region-pin14-exp1","label":"region-pin14-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin14-exp2":{"exp_id":"region-pin14-exp2","label":"region-pin14-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin14-exp3":{"exp_id":"region-pin14-exp3","label":"region-pin14-exp3","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin15-exp0":{"exp_id":"region-pin15-exp0","label":"region-pin15-exp0","state":"current","start":"2016/11/14 20:50:33","end":"2016/11/14 22:48:02","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin15-exp1":{"exp_id":"region-pin15-exp1","label":"region-pin15-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin15-exp2":{"exp_id":"region-pin15-exp2","label":"region-pin15-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin15-exp3":{"exp_id":"region-pin15-exp3","label":"region-pin15-exp3","state":"current","start":"2016/11/14 21:51:51","end":"2016/11/15 02:20:27","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin16-exp0":{"exp_id":"region-pin16-exp0","label":"region-pin16-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin16-exp1":{"exp_id":"region-pin16-exp1","label":"region-pin16-exp1","state":"current","start":"2016/11/14 20:53:18","end":"2016/11/15 02:15:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin17-exp0":{"exp_id":"region-pin17-exp0","label":"region-pin17-exp0","state":"current","start":"2016/11/14 20:40:21","end":"2016/11/15 01:07:01","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin18-exp0":{"exp_id":"region-pin18-exp0","label":"region-pin18-exp0","state":"current","start":"2016/11/14 21:51:58","end":"2016/11/15 02:14:43","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin18-exp1":{"exp_id":"region-pin18-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin19-exp0":{"exp_id":"region-pin19-exp0","label":"region-pin19-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin19-exp1":{"exp_id":"region-pin19-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin19-exp2":{"exp_id":"region-pin19-exp2","label":"region-pin19-exp2","state":"current","start":"2016/11/14 20:50:36","end":"2016/11/14 22:15:05","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin20-exp0":{"exp_id":"region-pin20-exp0","label":"region-pin20-exp0","state":"current","start":"2016/11/14 21:11:30","end":"2016/11/15 02:56:23","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin20-exp1":{"exp_id":"region-pin20-exp1","label":"region-pin20-exp1","state":"current","start":"2016/11/14 21:06:08","end":"2016/11/15 00:15:56","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin21-exp0":{"exp_id":"region-pin21-exp0","label":"region-pin21-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin21-exp1":{"exp_id":"region-pin21-exp1","label":"region-pin21-exp1","state":"current","start":"2016/11/14 21:22:36","end":"2016/11/15 00:07:44","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin21-exp2":{"exp_id":"region-pin21-exp2","label":"region-pin21-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin22-exp0":{"exp_id":"region-pin22-exp0","label":"Label only","content":"this is the text description","pin_id":null},"region-pin23-exp0":{"exp_id":"region-pin23-exp0","label":"region-pin23-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin23-exp1":{"exp_id":"region-pin23-exp1","label":"region-pin23-exp1","state":"current","start":"2016/11/14 21:34:01","end":"2016/11/15 02:09:53","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin24-exp0":{"exp_id":"region-pin24-exp0","label":"region-pin24-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin25-exp0":{"exp_id":"region-pin25-exp0","label":"region-pin25-exp0","state":"current","start":"2016/11/14 21:06:06","end":"2016/11/14 22:51:22","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin25-exp1":{"exp_id":"region-pin25-exp1","label":"region-pin25-exp1","state":"current","start":"2016/11/14 20:42:20","end":"2016/11/15 00:34:14","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin25-exp2":{"exp_id":"region-pin25-exp2","label":"region-pin25-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin26-exp0":{"exp_id":"region-pin26-exp0","label":"Label only","content":"this is the text description","pin_id":null},"region-pin26-exp1":{"exp_id":"region-pin26-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin26-exp2":{"exp_id":"region-pin26-exp2","label":"region-pin26-exp2","state":"current","start":"2016/11/14 21:58:58","end":"2016/11/14 23:12:18","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin26-exp3":{"exp_id":"region-pin26-exp3","label":"Label only","content":"this is the text description","pin_id":null},"region-pin27-exp0":{"exp_id":"region-pin27-exp0","label":"region-pin27-exp0","state":"current","start":"2016/11/14 20:50:23","end":"2016/11/15 01:44:05","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin28-exp0":{"exp_id":"region-pin28-exp0","label":"region-pin28-exp0","state":"current","start":"2016/11/14 21:13:57","end":"2016/11/14 22:52:47","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin28-exp1":{"exp_id":"region-pin28-exp1","label":"region-pin28-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin29-exp0":{"exp_id":"region-pin29-exp0","label":"region-pin29-exp0","state":"current","start":"2016/11/14 20:27:42","end":"2016/11/14 23:25:44","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin29-exp1":{"exp_id":"region-pin29-exp1","label":"region-pin29-exp1","state":"current","start":"2016/11/14 20:04:24","end":"2016/11/15 02:35:45","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin29-exp2":{"exp_id":"region-pin29-exp2","label":"region-pin29-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin29-exp3":{"exp_id":"region-pin29-exp3","label":"region-pin29-exp3","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin30-exp0":{"exp_id":"region-pin30-exp0","label":"region-pin30-exp0","state":"current","start":"2016/11/14 21:31:10","end":"2016/11/14 22:36:08","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin30-exp1":{"exp_id":"region-pin30-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin30-exp2":{"exp_id":"region-pin30-exp2","label":"region-pin30-exp2","state":"current","start":"2016/11/14 21:16:52","end":"2016/11/14 22:08:05","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin31-exp0":{"exp_id":"region-pin31-exp0","label":"region-pin31-exp0","state":"current","start":"2016/11/14 21:50:19","end":"2016/11/15 01:23:52","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin31-exp1":{"exp_id":"region-pin31-exp1","label":"region-pin31-exp1","state":"current","start":"2016/11/14 21:56:14","end":"2016/11/14 23:24:35","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin31-exp2":{"exp_id":"region-pin31-exp2","label":"region-pin31-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin31-exp3":{"exp_id":"region-pin31-exp3","label":"region-pin31-exp3","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin32-exp0":{"exp_id":"region-pin32-exp0","label":"Label only","content":"this is the text description","pin_id":null},"region-pin32-exp1":{"exp_id":"region-pin32-exp1","label":"region-pin32-exp1","state":"current","start":"2016/11/14 20:40:30","end":"2016/11/14 23:08:37","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin32-exp2":{"exp_id":"region-pin32-exp2","label":"region-pin32-exp2","state":"current","start":"2016/11/14 21:27:30","end":"2016/11/15 01:00:46","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin33-exp0":{"exp_id":"region-pin33-exp0","label":"region-pin33-exp0","state":"current","start":"2016/11/14 20:12:22","end":"2016/11/14 22:50:35","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin33-exp1":{"exp_id":"region-pin33-exp1","label":"region-pin33-exp1","state":"current","start":"2016/11/14 20:14:14","end":"2016/11/14 22:47:33","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin34-exp0":{"exp_id":"region-pin34-exp0","label":"region-pin34-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin34-exp1":{"exp_id":"region-pin34-exp1","label":"region-pin34-exp1","state":"current","start":"2016/11/14 21:38:46","end":"2016/11/15 02:40:12","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin35-exp0":{"exp_id":"region-pin35-exp0","label":"region-pin35-exp0","state":"current","start":"2016/11/14 20:03:44","end":"2016/11/14 23:54:21","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin35-exp1":{"exp_id":"region-pin35-exp1","label":"region-pin35-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin35-exp2":{"exp_id":"region-pin35-exp2","label":"region-pin35-exp2","state":"current","start":"2016/11/14 21:54:39","end":"2016/11/15 02:20:50","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin35-exp3":{"exp_id":"region-pin35-exp3","label":"Label only","content":"this is the text description","pin_id":null},"region-pin36-exp0":{"exp_id":"region-pin36-exp0","label":"region-pin36-exp0","state":"current","start":"2016/11/14 20:27:23","end":"2016/11/14 23:40:59","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin36-exp1":{"exp_id":"region-pin36-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin37-exp0":{"exp_id":"region-pin37-exp0","label":"region-pin37-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin37-exp1":{"exp_id":"region-pin37-exp1","label":"region-pin37-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin37-exp2":{"exp_id":"region-pin37-exp2","label":"region-pin37-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin37-exp3":{"exp_id":"region-pin37-exp3","label":"region-pin37-exp3","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin38-exp0":{"exp_id":"region-pin38-exp0","label":"region-pin38-exp0","state":"current","start":"2016/11/14 21:30:05","end":"2016/11/15 00:53:39","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin39-exp0":{"exp_id":"region-pin39-exp0","label":"Label only","content":"this is the text description","pin_id":null},"region-pin40-exp0":{"exp_id":"region-pin40-exp0","label":"region-pin40-exp0","state":"current","start":"2016/11/14 21:02:30","end":"2016/11/14 23:25:37","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin40-exp1":{"exp_id":"region-pin40-exp1","label":"region-pin40-exp1","state":"current","start":"2016/11/14 20:49:58","end":"2016/11/14 22:33:35","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin41-exp0":{"exp_id":"region-pin41-exp0","label":"region-pin41-exp0","state":"current","start":"2016/11/14 21:27:15","end":"2016/11/14 23:37:17","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin41-exp1":{"exp_id":"region-pin41-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin41-exp2":{"exp_id":"region-pin41-exp2","label":"Label only","content":"this is the text description","pin_id":null},"region-pin42-exp0":{"exp_id":"region-pin42-exp0","label":"region-pin42-exp0","state":"current","start":"2016/11/14 21:15:15","end":"2016/11/15 02:53:47","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin42-exp1":{"exp_id":"region-pin42-exp1","label":"region-pin42-exp1","state":"current","start":"2016/11/14 21:55:56","end":"2016/11/15 00:57:01","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin42-exp2":{"exp_id":"region-pin42-exp2","label":"region-pin42-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin43-exp0":{"exp_id":"region-pin43-exp0","label":"region-pin43-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin43-exp1":{"exp_id":"region-pin43-exp1","label":"region-pin43-exp1","state":"current","start":"2016/11/14 21:05:55","end":"2016/11/15 02:00:49","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin44-exp0":{"exp_id":"region-pin44-exp0","label":"region-pin44-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin45-exp0":{"exp_id":"region-pin45-exp0","label":"Label only","content":"this is the text description","pin_id":null},"region-pin45-exp1":{"exp_id":"region-pin45-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin46-exp0":{"exp_id":"region-pin46-exp0","label":"Label only","content":"this is the text description","pin_id":null},"region-pin46-exp1":{"exp_id":"region-pin46-exp1","label":"region-pin46-exp1","state":"current","start":"2016/11/14 21:45:39","end":"2016/11/15 00:31:45","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin46-exp2":{"exp_id":"region-pin46-exp2","label":"region-pin46-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin47-exp0":{"exp_id":"region-pin47-exp0","label":"region-pin47-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin47-exp1":{"exp_id":"region-pin47-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin48-exp0":{"exp_id":"region-pin48-exp0","label":"region-pin48-exp0","state":"current","start":"2016/11/14 21:14:32","end":"2016/11/14 23:13:11","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin48-exp1":{"exp_id":"region-pin48-exp1","label":"region-pin48-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin49-exp0":{"exp_id":"region-pin49-exp0","label":"region-pin49-exp0","state":"current","start":"2016/11/14 21:19:30","end":"2016/11/14 23:30:07","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin49-exp1":{"exp_id":"region-pin49-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin50-exp0":{"exp_id":"region-pin50-exp0","label":"region-pin50-exp0","state":"current","start":"2016/11/14 21:28:20","end":"2016/11/14 23:00:41","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin50-exp1":{"exp_id":"region-pin50-exp1","label":"region-pin50-exp1","state":"current","start":"2016/11/14 20:32:24","end":"2016/11/15 02:33:36","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin50-exp2":{"exp_id":"region-pin50-exp2","label":"region-pin50-exp2","state":"current","start":"2016/11/14 20:12:11","end":"2016/11/14 23:46:23","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin50-exp3":{"exp_id":"region-pin50-exp3","label":"region-pin50-exp3","state":"current","start":"2016/11/14 21:53:28","end":"2016/11/14 23:53:45","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin51-exp0":{"exp_id":"region-pin51-exp0","label":"region-pin51-exp0","state":"current","start":"2016/11/14 20:34:20","end":"2016/11/15 00:14:40","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin51-exp1":{"exp_id":"region-pin51-exp1","label":"region-pin51-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin52-exp0":{"exp_id":"region-pin52-exp0","label":"region-pin52-exp0","state":"current","start":"2016/11/14 21:48:10","end":"2016/11/15 00:51:12","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin52-exp1":{"exp_id":"region-pin52-exp1","label":"region-pin52-exp1","state":"current","start":"2016/11/14 20:37:20","end":"2016/11/14 23:04:45","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin52-exp2":{"exp_id":"region-pin52-exp2","label":"region-pin52-exp2","state":"current","start":"2016/11/14 21:31:11","end":"2016/11/15 01:51:52","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin52-exp3":{"exp_id":"region-pin52-exp3","label":"Label only","content":"this is the text description","pin_id":null},"region-pin53-exp0":{"exp_id":"region-pin53-exp0","label":"region-pin53-exp0","state":"current","start":"2016/11/14 20:16:06","end":"2016/11/14 23:40:13","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin53-exp1":{"exp_id":"region-pin53-exp1","label":"region-pin53-exp1","state":"current","start":"2016/11/14 21:54:31","end":"2016/11/15 02:53:59","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin53-exp2":{"exp_id":"region-pin53-exp2","label":"region-pin53-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin54-exp0":{"exp_id":"region-pin54-exp0","label":"region-pin54-exp0","state":"current","start":"2016/11/14 21:06:55","end":"2016/11/15 02:44:29","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin54-exp1":{"exp_id":"region-pin54-exp1","label":"region-pin54-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin55-exp0":{"exp_id":"region-pin55-exp0","label":"Label only","content":"this is the text description","pin_id":null},"region-pin56-exp0":{"exp_id":"region-pin56-exp0","label":"region-pin56-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin57-exp0":{"exp_id":"region-pin57-exp0","label":"region-pin57-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin57-exp1":{"exp_id":"region-pin57-exp1","label":"region-pin57-exp1","state":"current","start":"2016/11/14 21:50:12","end":"2016/11/15 01:28:38","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin57-exp2":{"exp_id":"region-pin57-exp2","label":"region-pin57-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin58-exp0":{"exp_id":"region-pin58-exp0","label":"region-pin58-exp0","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin58-exp1":{"exp_id":"region-pin58-exp1","label":"region-pin58-exp1","state":"current","start":"2016/11/14 20:45:09","end":"2016/11/14 22:13:32","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin58-exp2":{"exp_id":"region-pin58-exp2","label":"Label only","content":"this is the text description","pin_id":null},"region-pin59-exp0":{"exp_id":"region-pin59-exp0","label":"region-pin59-exp0","state":"current","start":"2016/11/14 21:38:43","end":"2016/11/14 23:22:04","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin59-exp1":{"exp_id":"region-pin59-exp1","label":"region-pin59-exp1","state":"current","start":"2016/11/14 21:57:39","end":"2016/11/15 01:25:59","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin1-exp1":{"exp_id":"region-pin1-exp1","label":"Label only","content":"this is the text description","pin_id":null},"region-pin6-exp2":{"exp_id":"region-pin6-exp2","label":"region-pin6-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin10-exp1":{"exp_id":"region-pin10-exp1","label":"region-pin10-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin11-exp2":{"exp_id":"region-pin11-exp2","label":"region-pin11-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin16-exp2":{"exp_id":"region-pin16-exp2","label":"region-pin16-exp2","state":"current","start":"2016/11/14 21:03:34","end":"2016/11/15 00:06:59","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin17-exp1":{"exp_id":"region-pin17-exp1","label":"region-pin17-exp1","state":"current","start":"2016/11/14 21:17:59","end":"2016/11/14 22:08:03","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin19-exp3":{"exp_id":"region-pin19-exp3","label":"region-pin19-exp3","state":"current","start":"2016/11/14 21:38:44","end":"2016/11/15 01:27:49","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin20-exp2":{"exp_id":"region-pin20-exp2","label":"region-pin20-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin20-exp3":{"exp_id":"region-pin20-exp3","label":"Label only","content":"this is the text description","pin_id":null},"region-pin21-exp3":{"exp_id":"region-pin21-exp3","label":"region-pin21-exp3","state":"current","start":"2016/11/14 21:15:08","end":"2016/11/15 01:42:19","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin22-exp1":{"exp_id":"region-pin22-exp1","label":"region-pin22-exp1","state":"current","start":"2016/11/14 20:35:02","end":"2016/11/14 22:10:34","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin22-exp2":{"exp_id":"region-pin22-exp2","label":"region-pin22-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin22-exp3":{"exp_id":"region-pin22-exp3","label":"region-pin22-exp3","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin23-exp2":{"exp_id":"region-pin23-exp2","label":"Label only","content":"this is the text description","pin_id":null},"region-pin23-exp3":{"exp_id":"region-pin23-exp3","label":"region-pin23-exp3","state":"current","start":"2016/11/14 20:48:48","end":"2016/11/14 23:33:31","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin24-exp1":{"exp_id":"region-pin24-exp1","label":"region-pin24-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin27-exp1":{"exp_id":"region-pin27-exp1","label":"region-pin27-exp1","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin27-exp2":{"exp_id":"region-pin27-exp2","label":"region-pin27-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin27-exp3":{"exp_id":"region-pin27-exp3","label":"region-pin27-exp3","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin32-exp3":{"exp_id":"region-pin32-exp3","label":"region-pin32-exp3","state":"current","start":"2016/11/14 21:27:33","end":"2016/11/15 00:54:36","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin33-exp2":{"exp_id":"region-pin33-exp2","label":"region-pin33-exp2","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin33-exp3":{"exp_id":"region-pin33-exp3","label":"region-pin33-exp3","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin34-exp2":{"exp_id":"region-pin34-exp2","label":"region-pin34-exp2","state":"current","start":"2016/11/14 20:33:00","end":"2016/11/14 23:54:15","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin34-exp3":{"exp_id":"region-pin34-exp3","label":"region-pin34-exp3","state":"current","start":"2016/11/14 21:06:47","end":"2016/11/14 23:11:00","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin38-exp1":{"exp_id":"region-pin38-exp1","label":"region-pin38-exp1","state":"current","start":"2016/11/14 21:41:23","end":"2016/11/15 02:39:30","hero_photo":2,"content":"this is the text description","pin_id":null},"region-pin38-exp2":{"exp_id":"region-pin38-exp2","label":"region-pin38-exp2","state":"current","start":"2016/11/14 21:04:25","end":"2016/11/15 02:52:48","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin38-exp3":{"exp_id":"region-pin38-exp3","label":"region-pin38-exp3","state":"current","start":"2016/11/14 20:58:55","end":"2016/11/14 23:23:07","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin39-exp1":{"exp_id":"region-pin39-exp1","label":"region-pin39-exp1","state":"current","start":"2016/11/14 20:02:44","end":"2016/11/15 00:21:32","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin41-exp3":{"exp_id":"region-pin41-exp3","label":"region-pin41-exp3","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin44-exp1":{"exp_id":"region-pin44-exp1","label":"region-pin44-exp1","state":"current","start":"2016/11/14 20:24:43","end":"2016/11/15 00:49:05","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin44-exp2":{"exp_id":"region-pin44-exp2","label":"region-pin44-exp2","state":"current","start":"2016/11/14 21:59:24","end":"2016/11/14 22:53:37","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin44-exp3":{"exp_id":"region-pin44-exp3","label":"region-pin44-exp3","state":"expired","start":"2016/11/08 14:30:00","end":"2016/11/08 15:00:00","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin46-exp3":{"exp_id":"region-pin46-exp3","label":"region-pin46-exp3","state":"current","start":"2016/11/14 20:56:04","end":"2016/11/14 23:53:43","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin48-exp2":{"exp_id":"region-pin48-exp2","label":"region-pin48-exp2","state":"current","start":"2016/11/14 21:38:16","end":"2016/11/14 22:06:12","hero_photo":1,"content":"this is the text description","pin_id":null},"region-pin48-exp3":{"exp_id":"region-pin48-exp3","label":"Label only","content":"this is the text description","pin_id":null},"region-pin49-exp2":{"exp_id":"region-pin49-exp2","label":"region-pin49-exp2","state":"current","start":"2016/11/14 21:27:36","end":"2016/11/14 23:00:09","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin49-exp3":{"exp_id":"region-pin49-exp3","label":"region-pin49-exp3","state":"current","start":"2016/11/14 20:57:08","end":"2016/11/15 01:01:06","hero_photo":3,"content":"this is the text description","pin_id":null},"region-pin51-exp2":{"exp_id":"region-pin51-exp2","label":"region-pin51-exp2","state":"current","start":"2016/11/14 21:26:24","end":"2016/11/15 00:36:57","hero_photo":4,"content":"this is the text description","pin_id":null},"region-pin56-exp1":{"exp_id":"region-pin56-exp1","label":"Label only","content":"this is the text description","pin_id":null}} diff --git a/index.js b/index.js index c4a54b2..00f559c 100644 --- a/index.js +++ b/index.js @@ -7,13 +7,11 @@ var fs = require('fs'); var util = require('util'); var mkdirp = require('mkdirp'); var getDirName = require('path').dirname; -var enableCache = true; +var enableCache = false; var cp = require('child_process').exec; var bodyParser = require('body-parser'); var imgCache = {}; -var regions = JSON.parse(require('fs').readFileSync('./regions.json')); - app.set('port', (process.env.PORT || 5000)); app.use('/public', express.static('public')); @@ -25,6 +23,31 @@ app.listen(app.get('port'), function() { console.log('Node app is running on port', app.get('port')); }); +app.get('/regions', function(req, res) { + + try { + var regions = fs.readdir('./regions/', function(err, files) { + console.log(files) + var results = []; + for(var i in files) { + if(/\.json$/i.test(files[i])) { + var meta = './regions/'+files[i]; + console.log('read region meta :', meta); + var region = JSON.parse(fs.readFileSync(meta)); + region.name = String(files[i]).replace(/\.json$/i,''); + results.push(region); + } + } + res.send(results); + }) + + // res.send(files) + }catch(err) { + console.log(err.stack); + } + +}) + app.post('/bounds/:region', function(req, res) { var region = req.params.region; console.log(region,req.body) @@ -234,7 +257,7 @@ function createTileFromRawImage(region, x, y, z, debug, cb) { ctx.rect(0, 0, 256, 256); ctx.fillStyle = '#F0F0F0'; ctx.fill(); - ctx.fillStyle = '#777'; + ctx.fillStyle = '#222'; ctx.font = '16px Arial'; ctx.fillText('OUT OF BOUND', 128, 128); var bytes = tileImg.toBuffer(undefined, 3, ctx.PNG_FILTER_NONE); @@ -285,7 +308,7 @@ function drawText(ctx,param, ox,oy, dx, dy, z) { var coords = 'from (' + [Math.round(ox), Math.floor(oy)].join(', ') + ')'; var coords2 = 'to (' + [Math.round(ox+dx), Math.floor(oy + dy)].join(', ') + ')'; ctx.font = '16px Arial'; - ctx.fillStyle = '#DDD'; + ctx.fillStyle = '#333'; ctx.fillText(info, 8, 24); ctx.fillText(coords, 8, 48); ctx.fillText(coords2, 8, 64); @@ -302,7 +325,7 @@ function generateTile(x,y,z) { ctx.rect(0, 0, 256, 256); ctx.fillStyle = '#F0F0F0'; ctx.fill(); - ctx.fillStyle = '#777'; + ctx.fillStyle = '#333'; ctx.font = '16px Arial'; ctx.fillText(coords, 24, 64); ctx.strokeStyle = 'white'; diff --git a/make-tiles.js b/make-tiles.js new file mode 100644 index 0000000..09c87e8 --- /dev/null +++ b/make-tiles.js @@ -0,0 +1,164 @@ +var Canvas = require('canvas'); +var Image = Canvas.Image; +var moment = require('moment'); +var fs = require('fs'); +var util = require('util'); +var mkdirp = require('mkdirp'); +var getDirName = require('path').dirname; +var cp = require('child_process').exec; +let img = new Image; +let imageCache = {}; + +console.log(process.argv); + +var regionName = process.argv[2]; +var min = +process.argv[3]; +var max = +process.argv[4]; +var val = JSON.parse(fs.readFileSync('./regions/'+regionName+'.json')).bounds; +console.log(val) +console.log('generate tiles:', regionName, min+'x', '~', max+'x'); +// get tms bounds for each zoom level +var total = 0; +var ranges = []; +for(var i = min; i <= max ; i++) { + var lt = getTileAtLatLng(val[0], i); + var rb = getTileAtLatLng(val[2], i); + var w = Math.abs(rb.x-lt.x); + var h = Math.abs(rb.y-lt.y); + ranges.push({ + zoom : i, + lt : lt, + rb : rb, + width : w, + height : h, + number : w*h + }); + total += w*h; +} +console.log('tiles needs to be generated :', total); +var now = 0; +for(var i=min;i<=max;i++) { + var lt = getTileAtLatLng(val[0], i); + var rb = getTileAtLatLng(val[2], i); + for(var j = lt.x; j < rb.x;j++){ + for(var k=lt.y; k < rb.y;k++) { + createTileFromRawImage(regionName, j,k,i, function() { + }); + } + } + +} + +function tileToLatLng(x,y,z) { + var result = { lat : tileToLat(y,z), lng : tileToLong(x,z) };; + return result; +} + +function tileToLong(x,z) { return (x/Math.pow(2,z)*360-180); } + +function tileToLat(y,z) { + var n = Math.PI-2*Math.PI*y/Math.pow(2,z); + return (180/Math.PI*Math.atan(0.5*(Math.exp(n)-Math.exp(-n)))); +} + +function createTileFromRawImage(region, x, y, z, cb) { + x = Math.floor(x); + y = Math.floor(y); + z = Math.floor(z); + let bounds = fs.readFile(`./regions/${region}.json`, (err, data) => { + + let {bounds} = JSON.parse(data); + let tileBounds = [ + tileToLatLng(x,y,z), + tileToLatLng(x+1,y,z), + tileToLatLng(x+1,y+1,z), + tileToLatLng(x,y+1,z) + ]; + if(imageCache[region]) { + render(null, imageCache[region]); + } + else { + fs.readFile(`./region-raw-img/${region}.png`, render); + } + + function render(err, data) { + if(!imageCache[region] ) + imageCache[region] = data; + if(err) + throw err; + let img = new Image; + img.src = data; + + let regionWidth = Math.abs(Math.abs(bounds[0].lng) - Math.abs(bounds[1].lng)), + regionHeight = Math.abs(Math.abs(bounds[1].lat) - Math.abs(bounds[2].lat)); + + let tileWidth = Math.abs(tileBounds[0].lng - tileBounds[1].lng) * img.width /regionWidth, + tileHeight = Math.abs(tileBounds[1].lat - tileBounds[2].lat) * img.height /regionHeight; + + let tileImg = new Canvas(256, 256); + let originX = (Math.abs(tileBounds[0].lng) - Math.abs(bounds[0].lng))/regionWidth * img.width; + let originY = (Math.abs(tileBounds[0].lat) - Math.abs(bounds[0].lat))/regionHeight * img.height; + let ctx = tileImg.getContext('2d'); + + if( originX > img.width + tileWidth || + originY > img.height + tileHeight || + originY < -tileHeight -1 || originX < -tileWidth -1 ) { + return + } + else { + ctx.drawImage(img, originX, originY, tileWidth, tileHeight, 0, 0, 256, 256); + ctx.strokeStyle = 'transparent'; + ctx.strokeRect(0, 0, 256, 256); + } + + var bytes = tileImg.toBuffer(undefined, 3, ctx.PNG_FILTER_NONE); + + var dir = `./regions/${region}/${z}/${x}${y}.png`; + mkdirp(getDirName(dir), function (err) { + if (err) + console.log(err); + + fs.writeFile(dir, bytes, function(err) { + if(err) + console.log(err) + console.log('remaining tiles', --total); + cb(); + }); + + }); + + } + + }); + +} + +var deleteFolderRecursive = function(path, cb) { + if( fs.existsSync(path) ) { + fs.readdirSync(path).forEach(function(file,index){ + var curPath = path + "/" + file; + if(fs.lstatSync(curPath).isDirectory()) { // recurse + deleteFolderRecursive(curPath); + } else { // delete file + fs.unlinkSync(curPath); + } + }); + fs.rmdirSync(path); + } + cb() +}; + +function fromLatLngToPoint (latLng){ + var siny = Math.min(Math.max(Math.sin(latLng.lat* (Math.PI / 180)), -.9999),.9999); + return { + x: 128 + latLng.lng * (256/360), + y: 128 + 0.5 * Math.log((1 + siny) / (1 - siny)) * -(256 / (2 * Math.PI)) + }; +} + +function getTileAtLatLng(latLng,zoom){ + var t=Math.pow(2,zoom), + s=256/t, + p=fromLatLngToPoint(latLng); + return {x:Math.floor(p.x/s),y:Math.floor(p.y/s),z:zoom}; +} diff --git a/public/app.js b/public/app.js index 866e6a5..533cb3f 100644 --- a/public/app.js +++ b/public/app.js @@ -1,170 +1,309 @@ -var regions = [[ - // north west - {lat: -33.3686095, lng: 149.7558751}, - // north east - {lat: -33.3686095, lng: 149.3558751}, - // south east - {lat: -33.5286095, lng: 149.3558751}, - // south west - {lat: -33.5286095, lng: 149.7558751}, -]]; - -$(function() { - - console.log('initialize') - $('#draw-region').on('click',function() { - - drawRegion(regions[0]) - }); +var map = null; +var markers = []; +var rect = null; +var app = new Vue({ + el: '#app', -}); + // data context -function drawRegion(region) { + data: { + regions : [], + selectedRegion : null, + regionZoom : 15, + regionCenter : { lat : 0, lng : 0 }, + viewerTMSCoord : '17,116005,79122', + viewerWidth : 3, + viewerHeight : 3, + tiles : [], + json : '', + selectedBounds : [{lat:0, lng:0},{lat:0, lng:0},{lat:0, lng:0},{lat:0, lng:0}], + config : { + zoomMin : 8, + zoomMax : 19, + ranges : [] + }, + }, - // Construct the polygon. - var bermudaTriangle = new google.maps.Polygon({ - paths: region, - strokeColor: '#FF0000', - strokeOpacity: 0.8, - strokeWeight: 3, - fillColor: '#00000000', - fillOpacity: 0.35 - }); - bermudaTriangle.setMap(map); + // lifecycle - // Add a listener for the click event. - bermudaTriangle.addListener('click', showArrays); + created : function() { + this.getRegions(); + }, - infoWindow = new google.maps.InfoWindow; -} + // watch prop changes -/** @this {google.maps.Polygon} */ -function showArrays(event) { - // Since this polygon has only one path, we can call getPath() to return the - // MVCArray of LatLngs. - var vertices = this.getPath(); + watch : { - var contentString = 'region
' + - 'Clicked location:
' + event.latLng.lat() + ',' + event.latLng.lng() + - '
'; + selectedBounds : function(val) { + var json = { bounds: val }; + app.json = JSON.stringify(json); + // get tms bounds for each zoom level + var min = app.config.zoomMin; + var max = app.config.zoomMax; + var ranges = []; + for(var i = min; i <= max ; i++) { + var lt = getTileAtLatLng(val[0], i); + var rb = getTileAtLatLng(val[2], i); + console.log(lt,rb,i) + ranges.push({ + zoom : i, + lt : lt, + rb : rb, + width : Math.abs(rb.x-lt.x), + height : Math.abs(rb.y-lt.y), + number : Math.abs((rb.x-lt.x) * (rb.y-lt.y)) + }) + } + console.log(ranges); + app.config.ranges = ranges; + }, - // Iterate over the vertices. - for (var i =0; i < vertices.getLength(); i++) { - var xy = vertices.getAt(i); - contentString += '
' + 'Coordinate ' + i + ':
' + xy.lat() + ',' + - xy.lng(); - } + regionZoom : function(val) { + map.setZoom(val); + }, - // Replace the info window's content and position. - infoWindow.setContent(contentString); - infoWindow.setPosition(event.latLng); + selectedRegion : function(key) { + console.log(key) + var region = null; + for(var i in app.regions) { + if(app.regions[i].name === key) { + region = app.regions[i]; + break + } + } + console.log(region); + if(!region) + return; + var center = { + lat : ((+region.bounds[0].lat) + (+region.bounds[2].lat))/2, + lng : ((+region.bounds[0].lng) + (+region.bounds[2].lng))/2 + }; + map.setZoom(app.regionZoom); + map.setCenter(center); + $.get('/bounds/' + key, function(data) { + var bounds = JSON.parse(data); + console.log('bounds', bounds); + // clear rect and redraw + app.selectedBounds = bounds.bounds; + for(var i in markers) { + markers[i].setMap(null); + } + rect && rect.setMap(null); + var marker1 = new google.maps.Marker({ + position: region.bounds[0], + label : 'LT', + map: map + }); + var marker2 = new google.maps.Marker({ + position: region.bounds[2], + label : 'RB', + map: map + }); + markers = [marker1, marker2]; + var rectBounds = { + north: Math.max(markers[0].position.lat(), markers[1].position.lat()), + south: Math.min(markers[0].position.lat(), markers[1].position.lat()), + east: Math.max(markers[0].position.lng(), markers[1].position.lng()), + west: Math.min(markers[0].position.lng(), markers[1].position.lng()) + }; + rect = new google.maps.Rectangle({ + strokeOpacity: 0.8, + strokeWeight: 0, + fillColor: '#007dff', + fillOpacity: 0.35, + map: map, + bounds: rectBounds + }); + }); + app.regionCenter = center; + }, - infoWindow.open(map); -} + }, -function handleMap(map){ - var getBounds = getFnDefineBounds(); - var drawRect = getFnDrawRect(); - map.addListener('click', function(event) { - bounds = getBounds({ lat: event.latLng.lat(), lng: event.latLng.lng() }, map); - drawRect(bounds); - }); -} + // methods -function getFnDrawRect(){ - var rect; - return function(bounds){ - clearIfNeed(); - if(bounds){ - rect = new google.maps.Rectangle({ - strokeColor: '#FF0000', - strokeOpacity: 0.8, - strokeWeight: 2, - fillOpacity: 0, - map: map, - bounds: bounds - }); - } - } - function clearIfNeed(){ - if(rect){ - rect.setMap(null); - rect = null; + methods : { + + stat : function() { + var json = { bounds: app.selectedBounds }; + app.json = JSON.stringify(json); + // get tms bounds for each zoom level + var min = app.config.zoomMin; + var max = app.config.zoomMax; + var ranges = []; + for(var i = min; i <= max ; i++) { + var lt = getTileAtLatLng(app.selectedBounds[0], i); + var rb = getTileAtLatLng(app.selectedBounds[2], i); + console.log(lt,rb,i) + ranges.push({ + zoom : i, + lt : lt, + rb : rb, + width : Math.abs(rb.x-lt.x), + height : Math.abs(rb.y-lt.y), + number : Math.abs((rb.x-lt.x) * (rb.y-lt.y)) + }) + } + console.log(ranges); + app.config.ranges = ranges; + }, + + getRegions : function() { + $.get('/regions', function(data) { + console.log(app.regions) + console.log('regions', data); + regions = data; + for(var i in data) { + var meta = data[i]; + app.regions.push(meta) + } + console.log(app.regions); + + }); + }, + + renderViewer() { + var z = Math.floor(String(app.viewerTMSCoord).split(',')[0]); + var x = Math.floor(String(app.viewerTMSCoord).split(',')[1]); + var y = Math.floor(String(app.viewerTMSCoord).split(',')[2]); + var tiles = []; + + for(var j = 0; j < app.viewerHeight; j++) { + var row = []; + for(var i = 0; i < app.viewerWidth; i++) { + row.push({ + src : '/tiles/debug/' + app.selectedRegion + '/' + [z, x+i, y+j].join('/') + '?v='+Date.now(), + base : '/base/' + [z, x+i, y+j].join('/') + }); } + tiles.push(row); + } + app.tiles = tiles; + console.log('render tiles', tiles) + }, + + viewerMove (dx, dy, dz) { + var coords = String(app.viewerTMSCoord).split(','); + var x = Math.floor((+coords[1] + dx) * Math.pow(2, dz)); + var z = (+coords[0]) + dz; + var y = Math.floor((+coords[2] + dy) * Math.pow(2, dz)); + app.viewerTMSCoord = [z,x,y].join(','); + console.log('viewer move', dx, dy, dz,app.viewerTMSCoord) + app.renderViewer(); + }, + + updateRegionBounds() { + var body = {}; + body.bounds = app.selectedBounds; + var xhr = new XMLHttpRequest(); + xhr.open('POST', '/bounds/'+ app.selectedRegion); + xhr.setRequestHeader('Content-Type', 'application/json'); + xhr.send(JSON.stringify(body)); + console.log(app.selectedBounds); } -} -function getFnDefineBounds(){ - var count = 0; - var markerAry = []; - return function(location, map){ - var oldMarker; - var newMarker = new google.maps.Marker({ - position: location, - animation: google.maps.Animation.DROP, - map: map - }); - if(count%2==0){ - oldMarker = markerAry[0]; - markerAry[0] = newMarker; - } - else{ - oldMarker = markerAry[1]; - markerAry[1] = newMarker; - } + }, - clearIfNeed(oldMarker, infowindow); - var infowindow = new google.maps.InfoWindow(); - infowindow.setContent('lat: ' + location.lat + '
' + 'lng: ' + location.lng); - infowindow.open(map, newMarker); +}); - count++; - return getBounds(markerAry); +function initMap() { + map = new google.maps.Map(document.getElementById('map'), { + zoom: 16, + center: {lat: -34.9270088, lng: 138.6089918}, + mapTypeId: google.maps.MapTypeId.TERRAIN + }); + map.addListener('click', function(event) { + if(markers.length > 1) { + for(var i in markers) { + markers[i].setMap(null); + } + markers = []; + } + var ll = { + lat: event.latLng.lat(), + lng: event.latLng.lng() + }; + bounds = getBounds(ll, map); + var marker = new google.maps.Marker({ + position: ll, + label : markers.length === 0 ? 'LT' : 'RB', + map: map + }); + var info = new google.maps.InfoWindow(); + info.setContent('lat: ' + ll.lat + '
' + 'lng: ' + ll.lng); + info.open(map, marker); + markers.push(marker); + // draw rect + if(markers.length === 2) { + var bounds = { + north: Math.max(markers[0].position.lat(), markers[1].position.lat()), + south: Math.min(markers[0].position.lat(), markers[1].position.lat()), + east: Math.max(markers[0].position.lng(), markers[1].position.lng()), + west: Math.min(markers[0].position.lng(), markers[1].position.lng()) + }; + rect && rect.setMap(null); + rect = new google.maps.Rectangle({ + strokeOpacity: 0.8, + strokeWeight: 0, + fillColor: '#007dff', + fillOpacity: 0.35, + map: map, + bounds: bounds + }); + app.selectedBounds = [ + { lat : bounds.west, lng : bounds.north }, + { lat : bounds.east, lng : bounds.north }, + { lat : bounds.east, lng : bounds.south }, + { lat : bounds.west, lng : bounds.south }, + ]; + console.log('rectBounds', bounds) } - function clearIfNeed(oldMarker, infowindow){ - if(infowindow){ - infowindow.close(); + }); +} + +function fromLatLngToPoint (latLng){ + var siny = Math.min(Math.max(Math.sin(latLng.lat* (Math.PI / 180)), -.9999),.9999); + return { + x: 128 + latLng.lng * (256/360), + y: 128 + 0.5 * Math.log((1 + siny) / (1 - siny)) * -(256 / (2 * Math.PI)) + }; +} + +function getTileAtLatLng(latLng,zoom){ + var t=Math.pow(2,zoom), + s=256/t, + p=this.fromLatLngToPoint(latLng); + return {x:Math.floor(p.x/s),y:Math.floor(p.y/s),z:zoom}; +} + +function getBounds(markerAry){ + if(markerAry && markerAry.length >1){ + var n, s, w, e; + var lat = []; + lat[0] = markerAry[0].position.lat(); + lat[1] = markerAry[1].position.lat(); + if(Math.abs(lat[0]) < Math.abs(lat[1])){ + n = lat[0]; + s = lat[1]; } - if(oldMarker){ - oldMarker.setMap(null); - oldMarker = null; + else{ + s = lat[0]; + n = lat[1]; } - } - function getBounds(markerAry){ - if(markerAry && markerAry.length >1){ - var n, s, w, e; - var lat = []; - lat[0] = markerAry[0].position.lat(); - lat[1] = markerAry[1].position.lat(); - if(Math.abs(lat[0]) < Math.abs(lat[1])){ - n = lat[0]; - s = lat[1]; - } - else{ - s = lat[0]; - n = lat[1]; - } - var lng = []; - lng[0] = markerAry[0].position.lng(); - lng[1] = markerAry[1].position.lng(); - if(Math.abs(lng[0]) < Math.abs(lng[1])){ - w = lng[0]; - e = lng[1]; - } - else{ - e = lng[0]; - w = lng[1]; - } - return {north: n, south: s, west: w, east: e}; + var lng = []; + lng[0] = markerAry[0].position.lng(); + lng[1] = markerAry[1].position.lng(); + if(Math.abs(lng[0]) < Math.abs(lng[1])){ + w = lng[0]; + e = lng[1]; + } + else{ + e = lng[0]; + w = lng[1]; } + return {north: n, south: s, west: w, east: e}; } } - -function extendBound(map, latLngLiteral){ - var bounds = map.getBounds(); - bounds.extend(latLngLiteral); - map.fitBounds(bounds); -} diff --git a/public/demo-map.jpg b/public/demo-map.jpg deleted file mode 100644 index 1f4ae59..0000000 Binary files a/public/demo-map.jpg and /dev/null differ diff --git a/public/demo.html b/public/demo.html deleted file mode 100644 index bf014bb..0000000 --- a/public/demo.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - Tiles Demo - - - - - -
-

Origin

- - - x - - -
-

Top left

- - - -
-
-

Bottom right

- - - -
-
- - - - -
-
- - diff --git a/public/event-bg0.png b/public/event-bg0.png deleted file mode 100644 index a733891..0000000 Binary files a/public/event-bg0.png and /dev/null differ diff --git a/public/event-bg1.png b/public/event-bg1.png deleted file mode 100644 index 409516a..0000000 Binary files a/public/event-bg1.png and /dev/null differ diff --git a/public/event-bg2.png b/public/event-bg2.png deleted file mode 100644 index ff435da..0000000 Binary files a/public/event-bg2.png and /dev/null differ diff --git a/public/event-bg3.png b/public/event-bg3.png deleted file mode 100644 index f449f30..0000000 Binary files a/public/event-bg3.png and /dev/null differ diff --git a/public/event-bg4.png b/public/event-bg4.png deleted file mode 100755 index 73a9df0..0000000 Binary files a/public/event-bg4.png and /dev/null differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..ee5f979 --- /dev/null +++ b/public/index.html @@ -0,0 +1,107 @@ + + + + + + Editor + + + + +
+
+ +
+

Regions

+ +
+ +

Zoom x {{ regionZoom }}

+ +
+
+

Latitude

+ +
+
+

Longitude

+ +
+
+
+ +
+ +

Origin

+
+ name  + TMS coord  +
+
+ x + + +
+
+

Top left

+ + + +
+
+

Bottom right

+ + + +
+ + + + + + + +
+
+
+ + +
+
+
+
+ +
+

Tiles Generation Configs

+
+

Zoom

+ ~ + + +
+
+ {{s.zoom}}X ({{s.lt.x}}~{{s.rb.x}}, {{s.lt.y}}~{{s.rb.y}}) {{s.width}}x{{s.height}}, {{ s.number }} tiles +
+
+
+
+ + + + + diff --git a/public/map-editor.html b/public/map-editor.html deleted file mode 100644 index 6bab30a..0000000 --- a/public/map-editor.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Map Editor - - - - -
-
-
Draw
-
- - - - - - diff --git a/public/style.css b/public/style.css index 5ba4c91..0dd57e6 100644 --- a/public/style.css +++ b/public/style.css @@ -1,5 +1,6 @@ html, body { - margin: 0; + margin: 1rem; + text-align: center; padding: 0; } @@ -23,9 +24,11 @@ html, body { height : 128px; width:128px; } - .overlay-tile { position: absolute; top : 0; left : 0; } +.row > * { + display: inline-block; +} diff --git a/public/viewer.js b/public/viewer.js deleted file mode 100644 index 24caec9..0000000 --- a/public/viewer.js +++ /dev/null @@ -1,73 +0,0 @@ -$(function() { - - $('#render-btn').click(function() { - var region = $('#region').val() - $.get('/bounds/'+region, function(data) { - var bounds = JSON.parse(data).bounds; - console.log('bounds=', bounds) - $('#ub-lat').val(bounds[0].lat); - $('#ub-lng').val(bounds[0].lng); - $('#lb-lat').val(bounds[2].lat); - $('#lb-lng').val(bounds[2].lng); - }) - renderTiles() - }) - - $('.update-btn').click(function() { - // {"bounds":[{"lat":"-34.921073745369675","lng":"138.6085581777948"},{"lat":"-34.921073745369675","lng":"138.6272251304265"},{"lat":"-34.93560465273544","lng":"138.6272251304265"},{"lat":"-34.93560465273544","lng":"138.6085581777948"}]} - var xhr = new XMLHttpRequest(); - var c1 = { lat : $('#ub-lat').val(), lng : $('#ub-lng').val() }; - var c2 = { lat : $('#lb-lat').val(), lng : $('#lb-lng').val() }; - var region = $('#region').val() - var body = { - bounds : [ - c1, - { lat : c1.lat, lng : c2.lng }, - c2, - { lat : c2.lat, lng : c1.lng }, - ] - }; - console.log('body', body) - xhr.open('POST', '/bounds/'+region); - xhr.setRequestHeader('Content-Type', 'application/json'); - xhr.send(JSON.stringify(body)); - }) - - $('.move').click(function() { - var dx = $(this).attr('x') || 0 - var dy = $(this).attr('y') || 0 - var coords = $('#coords').val() - var x = (+String(coords).split(',')[1])+Math.floor(dx) - var z = String(coords).split(',')[0] - var y = (+String(coords).split(',')[2])+Math.floor(dy) - $('#coords').val([z,x,y].join(',')); - renderTiles() - }) - - function renderTiles() { - var region = $('#region').val() - var coords = $('#coords').val() - var height = $('#height').val() - var width = $('#width').val() - console.log('render ',region, 'coords:', coords, 'height=', height, 'width=', width) - $('#tiles').empty() - for(var i = 0; i < height; i++) { - var row = $('
') - for(var j = 0; j < width; j++) { - var id = String(coords).split(',') - var z = id[0] - var x = (+id[1]) + j - var y = (+id[2]) + i - var res = [z,x, y].join('/') - var wrapper = $('
') - var tile = $('') - var tilebg = $('') - wrapper.append(tilebg) - wrapper.append(tile) - row.append(wrapper) - } - $('#tiles').append(row) - } - } - -}) diff --git a/ref.md b/ref.md deleted file mode 100644 index 184c092..0000000 --- a/ref.md +++ /dev/null @@ -1,3 +0,0 @@ -http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/ - -33.4486095,149.5558751 diff --git a/regions.json b/regions.json deleted file mode 100644 index 68274ad..0000000 --- a/regions.json +++ /dev/null @@ -1 +0,0 @@ -{"newmark":{"overlayURI":"bundle://newmark.jpg","coords":[{"latitude":40.712216,"longitude":-74.22655},{"latitude":40.773941,"longitude":-74.12544}],"lat":0,"lon":0,"pins":[{"pin_id":"region-pin0","label":"pin#0 of 60","lat":40.75353812524581,"lon":-74.12600182080502,"type":"Food & Drink","experiences":["region-pin0-exp0","region-pin0-exp1","region-pin0-exp2"]},{"pin_id":"region-pin1","label":"pin#1 of 60","lat":40.73536999492263,"lon":-74.13524809529974,"type":"Amenities","experiences":["region-pin1-exp0"]},{"pin_id":"region-pin2","label":"pin#2 of 60","lat":40.73600406975246,"lon":-74.19457108887164,"type":"Transport","experiences":["region-pin2-exp0","region-pin2-exp1","region-pin2-exp2","region-pin2-exp3"]},{"pin_id":"region-pin3","label":"pin#3 of 60","lat":40.75854112613014,"lon":-74.1592135706702,"type":"Transport","experiences":["region-pin3-exp0","region-pin3-exp1","region-pin3-exp2"]},{"pin_id":"region-pin4","label":"pin#4 of 60","lat":40.75601546032957,"lon":-74.16778373067802,"type":"Food & Drink","experiences":["region-pin4-exp0","region-pin4-exp1"]},{"pin_id":"region-pin5","label":"pin#5 of 60","lat":40.728561818919246,"lon":-74.21936609321189,"type":"Food & Drink","experiences":["region-pin5-exp0","region-pin5-exp1","region-pin5-exp2","region-pin5-exp3"]},{"pin_id":"region-pin6","label":"pin#6 of 60","lat":40.714103072518576,"lon":-74.18682212632665,"type":"Transport","experiences":["region-pin6-exp0","region-pin6-exp1"]},{"pin_id":"region-pin7","label":"pin#7 of 60","lat":40.74972750122572,"lon":-74.18692984052987,"type":"Food & Drink","experiences":["region-pin7-exp0","region-pin7-exp1","region-pin7-exp2","region-pin7-exp3"]},{"pin_id":"region-pin8","label":"pin#8 of 60","lat":40.71414004680992,"lon":-74.21842325488336,"type":"Events / Experiences","experiences":["region-pin8-exp0","region-pin8-exp1","region-pin8-exp2"]},{"pin_id":"region-pin9","label":"pin#9 of 60","lat":40.77092060541241,"lon":-74.15414963220925,"type":"Food & Drink","experiences":["region-pin9-exp0","region-pin9-exp1","region-pin9-exp2","region-pin9-exp3"]},{"pin_id":"region-pin10","label":"pin#10 of 60","lat":40.719434692589296,"lon":-74.1614736686408,"type":"Food & Drink","experiences":["region-pin10-exp0"]},{"pin_id":"region-pin11","label":"pin#11 of 60","lat":40.74964753531347,"lon":-74.15933002116435,"type":"Transport","experiences":["region-pin11-exp0","region-pin11-exp1"]},{"pin_id":"region-pin12","label":"pin#12 of 60","lat":40.76615576481214,"lon":-74.19112186112801,"type":"Amenities","experiences":["region-pin12-exp0","region-pin12-exp1","region-pin12-exp2"]},{"pin_id":"region-pin13","label":"pin#13 of 60","lat":40.7627278794921,"lon":-74.13613702122365,"type":"Transport","experiences":["region-pin13-exp0","region-pin13-exp1","region-pin13-exp2","region-pin13-exp3"]},{"pin_id":"region-pin14","label":"pin#14 of 60","lat":40.726919479965495,"lon":-74.13726248742523,"type":"Transport","experiences":["region-pin14-exp0","region-pin14-exp1","region-pin14-exp2","region-pin14-exp3"]},{"pin_id":"region-pin15","label":"pin#15 of 60","lat":40.768610855110694,"lon":-74.15852509033255,"type":"Food & Drink","experiences":["region-pin15-exp0","region-pin15-exp1","region-pin15-exp2","region-pin15-exp3"]},{"pin_id":"region-pin16","label":"pin#16 of 60","lat":40.725132498169295,"lon":-74.14207989893714,"type":"Transport","experiences":["region-pin16-exp0","region-pin16-exp1"]},{"pin_id":"region-pin17","label":"pin#17 of 60","lat":40.747757165032475,"lon":-74.17934844438682,"type":"Transport","experiences":["region-pin17-exp0"]},{"pin_id":"region-pin18","label":"pin#18 of 60","lat":40.73182360338808,"lon":-74.12834986179249,"type":"Amenities","experiences":["region-pin18-exp0","region-pin18-exp1"]},{"pin_id":"region-pin19","label":"pin#19 of 60","lat":40.72973928192861,"lon":-74.17505401910219,"type":"Food & Drink","experiences":["region-pin19-exp0","region-pin19-exp1","region-pin19-exp2"]},{"pin_id":"region-pin20","label":"pin#20 of 60","lat":40.71610990683875,"lon":-74.19803056876471,"type":"Events / Experiences","experiences":["region-pin20-exp0","region-pin20-exp1"]},{"pin_id":"region-pin21","label":"pin#21 of 60","lat":40.715021476328985,"lon":-74.1427344157986,"type":"Events / Experiences","experiences":["region-pin21-exp0","region-pin21-exp1","region-pin21-exp2"]},{"pin_id":"region-pin22","label":"pin#22 of 60","lat":40.762201188829195,"lon":-74.20713720737334,"type":"Amenities","experiences":["region-pin22-exp0"]},{"pin_id":"region-pin23","label":"pin#23 of 60","lat":40.73943821405114,"lon":-74.14758150124045,"type":"Amenities","experiences":["region-pin23-exp0","region-pin23-exp1"]},{"pin_id":"region-pin24","label":"pin#24 of 60","lat":40.75039917087806,"lon":-74.206681298084,"type":"Food & Drink","experiences":["region-pin24-exp0"]},{"pin_id":"region-pin25","label":"pin#25 of 60","lat":40.74685968133322,"lon":-74.15607377801234,"type":"Amenities","experiences":["region-pin25-exp0","region-pin25-exp1","region-pin25-exp2"]},{"pin_id":"region-pin26","label":"pin#26 of 60","lat":40.76296350809306,"lon":-74.15583895415097,"type":"Food & Drink","experiences":["region-pin26-exp0","region-pin26-exp1","region-pin26-exp2","region-pin26-exp3"]},{"pin_id":"region-pin27","label":"pin#27 of 60","lat":40.72886176050848,"lon":-74.13290705380739,"type":"Events / Experiences","experiences":["region-pin27-exp0"]},{"pin_id":"region-pin28","label":"pin#28 of 60","lat":40.7391678665539,"lon":-74.17351927935788,"type":"Events / Experiences","experiences":["region-pin28-exp0","region-pin28-exp1"]},{"pin_id":"region-pin29","label":"pin#29 of 60","lat":40.773563178501256,"lon":-74.16995270234015,"type":"Events / Experiences","experiences":["region-pin29-exp0","region-pin29-exp1","region-pin29-exp2","region-pin29-exp3"]},{"pin_id":"region-pin30","label":"pin#30 of 60","lat":40.75446029138016,"lon":-74.21767313738151,"type":"Events / Experiences","experiences":["region-pin30-exp0","region-pin30-exp1","region-pin30-exp2"]},{"pin_id":"region-pin31","label":"pin#31 of 60","lat":40.72880111057615,"lon":-74.13227852895405,"type":"Transport","experiences":["region-pin31-exp0","region-pin31-exp1","region-pin31-exp2","region-pin31-exp3"]},{"pin_id":"region-pin32","label":"pin#32 of 60","lat":40.743960794195715,"lon":-74.15638217004526,"type":"Transport","experiences":["region-pin32-exp0","region-pin32-exp1","region-pin32-exp2"]},{"pin_id":"region-pin33","label":"pin#33 of 60","lat":40.72165022505235,"lon":-74.18090013281086,"type":"Events / Experiences","experiences":["region-pin33-exp0","region-pin33-exp1"]},{"pin_id":"region-pin34","label":"pin#34 of 60","lat":40.72110053498114,"lon":-74.17367990615213,"type":"Events / Experiences","experiences":["region-pin34-exp0","region-pin34-exp1"]},{"pin_id":"region-pin35","label":"pin#35 of 60","lat":40.75993135680758,"lon":-74.18348645613821,"type":"Food & Drink","experiences":["region-pin35-exp0","region-pin35-exp1","region-pin35-exp2","region-pin35-exp3"]},{"pin_id":"region-pin36","label":"pin#36 of 60","lat":40.71355866191633,"lon":-74.14468773853417,"type":"Transport","experiences":["region-pin36-exp0","region-pin36-exp1"]},{"pin_id":"region-pin37","label":"pin#37 of 60","lat":40.72646363633581,"lon":-74.16744642016312,"type":"Amenities","experiences":["region-pin37-exp0","region-pin37-exp1","region-pin37-exp2","region-pin37-exp3"]},{"pin_id":"region-pin38","label":"pin#38 of 60","lat":40.723966183537236,"lon":-74.19138708381267,"type":"Transport","experiences":["region-pin38-exp0"]},{"pin_id":"region-pin39","label":"pin#39 of 60","lat":40.715559870190745,"lon":-74.22425433348958,"type":"Amenities","experiences":["region-pin39-exp0"]},{"pin_id":"region-pin40","label":"pin#40 of 60","lat":40.76873002621862,"lon":-74.17094938866241,"type":"Transport","experiences":["region-pin40-exp0","region-pin40-exp1"]},{"pin_id":"region-pin41","label":"pin#41 of 60","lat":40.726967599028285,"lon":-74.16286508108361,"type":"Amenities","experiences":["region-pin41-exp0","region-pin41-exp1","region-pin41-exp2"]},{"pin_id":"region-pin42","label":"pin#42 of 60","lat":40.728909450551186,"lon":-74.18089062149619,"type":"Events / Experiences","experiences":["region-pin42-exp0","region-pin42-exp1","region-pin42-exp2"]},{"pin_id":"region-pin43","label":"pin#43 of 60","lat":40.77007782424753,"lon":-74.145380756171,"type":"Food & Drink","experiences":["region-pin43-exp0","region-pin43-exp1"]},{"pin_id":"region-pin44","label":"pin#44 of 60","lat":40.729297587797745,"lon":-74.21106450018304,"type":"Amenities","experiences":["region-pin44-exp0"]},{"pin_id":"region-pin45","label":"pin#45 of 60","lat":40.73446372785673,"lon":-74.20070001542929,"type":"Food & Drink","experiences":["region-pin45-exp0","region-pin45-exp1"]},{"pin_id":"region-pin46","label":"pin#46 of 60","lat":40.747573736708496,"lon":-74.14000054331584,"type":"Events / Experiences","experiences":["region-pin46-exp0","region-pin46-exp1","region-pin46-exp2"]},{"pin_id":"region-pin47","label":"pin#47 of 60","lat":40.74815852575571,"lon":-74.22183384684524,"type":"Transport","experiences":["region-pin47-exp0","region-pin47-exp1"]},{"pin_id":"region-pin48","label":"pin#48 of 60","lat":40.75777925997676,"lon":-74.1903524909097,"type":"Transport","experiences":["region-pin48-exp0","region-pin48-exp1"]},{"pin_id":"region-pin49","label":"pin#49 of 60","lat":40.71533536511875,"lon":-74.12844342955248,"type":"Amenities","experiences":["region-pin49-exp0","region-pin49-exp1"]},{"pin_id":"region-pin50","label":"pin#50 of 60","lat":40.714136027744864,"lon":-74.16978408283963,"type":"Food & Drink","experiences":["region-pin50-exp0","region-pin50-exp1","region-pin50-exp2","region-pin50-exp3"]},{"pin_id":"region-pin51","label":"pin#51 of 60","lat":40.716329375448325,"lon":-74.16646787173129,"type":"Transport","experiences":["region-pin51-exp0","region-pin51-exp1"]},{"pin_id":"region-pin52","label":"pin#52 of 60","lat":40.72425650430917,"lon":-74.18621362900066,"type":"Transport","experiences":["region-pin52-exp0","region-pin52-exp1","region-pin52-exp2","region-pin52-exp3"]},{"pin_id":"region-pin53","label":"pin#53 of 60","lat":40.71554733863489,"lon":-74.16575718984417,"type":"Amenities","experiences":["region-pin53-exp0","region-pin53-exp1","region-pin53-exp2"]},{"pin_id":"region-pin54","label":"pin#54 of 60","lat":40.77357896114222,"lon":-74.17722755167527,"type":"Amenities","experiences":["region-pin54-exp0","region-pin54-exp1"]},{"pin_id":"region-pin55","label":"pin#55 of 60","lat":40.74137955553179,"lon":-74.185797968313,"type":"Events / Experiences","experiences":["region-pin55-exp0"]},{"pin_id":"region-pin56","label":"pin#56 of 60","lat":40.729403529321395,"lon":-74.13843310684695,"type":"Transport","experiences":["region-pin56-exp0"]},{"pin_id":"region-pin57","label":"pin#57 of 60","lat":40.76507933760731,"lon":-74.18169708176514,"type":"Transport","experiences":["region-pin57-exp0","region-pin57-exp1","region-pin57-exp2"]},{"pin_id":"region-pin58","label":"pin#58 of 60","lat":40.731892830122,"lon":-74.14119750983232,"type":"Amenities","experiences":["region-pin58-exp0","region-pin58-exp1","region-pin58-exp2"]},{"pin_id":"region-pin59","label":"pin#59 of 60","lat":40.741484517554305,"lon":-74.18876924390402,"type":"Amenities","experiences":["region-pin59-exp0","region-pin59-exp1"]}]},"taiwan":{"overlayURI":"bundle://taiwan.jpg","coords":[{"latitude":21.001,"longitude":120.001},{"latitude":26.001,"longitude":122.001}],"pins":[{"pin_id":"region-pin0","label":"pin#0 of 60","lat":24.555095052625532,"lon":121.4843498949795,"type":"Food & Drink","experiences":["region-pin0-exp0"]},{"pin_id":"region-pin1","label":"pin#1 of 60","lat":22.174417863397633,"lon":120.1954813207799,"type":"Amenities","experiences":["region-pin1-exp0","region-pin1-exp1"]},{"pin_id":"region-pin2","label":"pin#2 of 60","lat":23.4237576005709,"lon":121.18286945159878,"type":"Transport","experiences":["region-pin2-exp0","region-pin2-exp1"]},{"pin_id":"region-pin3","label":"pin#3 of 60","lat":24.03915430852452,"lon":120.18021354043188,"type":"Transport","experiences":["region-pin3-exp0","region-pin3-exp1","region-pin3-exp2"]},{"pin_id":"region-pin4","label":"pin#4 of 60","lat":23.492664757370893,"lon":121.53638032499966,"type":"Amenities","experiences":["region-pin4-exp0"]},{"pin_id":"region-pin5","label":"pin#5 of 60","lat":25.180676220001168,"lon":121.23345234108898,"type":"Amenities","experiences":["region-pin5-exp0"]},{"pin_id":"region-pin6","label":"pin#6 of 60","lat":23.513201535376098,"lon":121.70691006317976,"type":"Events / Experiences","experiences":["region-pin6-exp0","region-pin6-exp1","region-pin6-exp2"]},{"pin_id":"region-pin7","label":"pin#7 of 60","lat":25.151589269644084,"lon":120.66580895832205,"type":"Events / Experiences","experiences":["region-pin7-exp0","region-pin7-exp1","region-pin7-exp2"]},{"pin_id":"region-pin8","label":"pin#8 of 60","lat":21.675358598728913,"lon":120.43594230861808,"type":"Events / Experiences","experiences":["region-pin8-exp0","region-pin8-exp1","region-pin8-exp2"]},{"pin_id":"region-pin9","label":"pin#9 of 60","lat":24.50925818734851,"lon":120.30298277133379,"type":"Food & Drink","experiences":["region-pin9-exp0","region-pin9-exp1"]},{"pin_id":"region-pin10","label":"pin#10 of 60","lat":21.23149428982555,"lon":121.51163804297185,"type":"Food & Drink","experiences":["region-pin10-exp0","region-pin10-exp1"]},{"pin_id":"region-pin11","label":"pin#11 of 60","lat":23.571156252149684,"lon":120.82552011105054,"type":"Events / Experiences","experiences":["region-pin11-exp0","region-pin11-exp1","region-pin11-exp2"]},{"pin_id":"region-pin12","label":"pin#12 of 60","lat":25.403334868055286,"lon":120.2626143945362,"type":"Events / Experiences","experiences":["region-pin12-exp0","region-pin12-exp1"]},{"pin_id":"region-pin13","label":"pin#13 of 60","lat":23.750681250695187,"lon":121.3231213382135,"type":"Amenities","experiences":["region-pin13-exp0"]},{"pin_id":"region-pin14","label":"pin#14 of 60","lat":24.93473034027941,"lon":120.55267494300898,"type":"Food & Drink","experiences":["region-pin14-exp0","region-pin14-exp1"]},{"pin_id":"region-pin15","label":"pin#15 of 60","lat":24.924154467387893,"lon":121.62395857352425,"type":"Transport","experiences":["region-pin15-exp0"]},{"pin_id":"region-pin16","label":"pin#16 of 60","lat":24.530713469068623,"lon":121.31523456831533,"type":"Events / Experiences","experiences":["region-pin16-exp0","region-pin16-exp1","region-pin16-exp2"]},{"pin_id":"region-pin17","label":"pin#17 of 60","lat":23.133006883164516,"lon":121.01798079044636,"type":"Amenities","experiences":["region-pin17-exp0","region-pin17-exp1"]},{"pin_id":"region-pin18","label":"pin#18 of 60","lat":25.853004287232636,"lon":120.57677092110991,"type":"Amenities","experiences":["region-pin18-exp0","region-pin18-exp1"]},{"pin_id":"region-pin19","label":"pin#19 of 60","lat":22.68472785718808,"lon":120.64964472074585,"type":"Events / Experiences","experiences":["region-pin19-exp0","region-pin19-exp1","region-pin19-exp2","region-pin19-exp3"]},{"pin_id":"region-pin20","label":"pin#20 of 60","lat":22.33885370870027,"lon":120.69742857042645,"type":"Events / Experiences","experiences":["region-pin20-exp0","region-pin20-exp1","region-pin20-exp2","region-pin20-exp3"]},{"pin_id":"region-pin21","label":"pin#21 of 60","lat":24.174109509600033,"lon":121.51250809563702,"type":"Transport","experiences":["region-pin21-exp0","region-pin21-exp1","region-pin21-exp2","region-pin21-exp3"]},{"pin_id":"region-pin22","label":"pin#22 of 60","lat":24.89858653908013,"lon":121.26885392291926,"type":"Transport","experiences":["region-pin22-exp0","region-pin22-exp1","region-pin22-exp2","region-pin22-exp3"]},{"pin_id":"region-pin23","label":"pin#23 of 60","lat":22.544314931333574,"lon":120.80361654254746,"type":"Transport","experiences":["region-pin23-exp0","region-pin23-exp1","region-pin23-exp2","region-pin23-exp3"]},{"pin_id":"region-pin24","label":"pin#24 of 60","lat":23.70711067145385,"lon":120.47850804431168,"type":"Events / Experiences","experiences":["region-pin24-exp0","region-pin24-exp1"]},{"pin_id":"region-pin25","label":"pin#25 of 60","lat":24.453426983076305,"lon":121.80180048594427,"type":"Food & Drink","experiences":["region-pin25-exp0"]},{"pin_id":"region-pin26","label":"pin#26 of 60","lat":24.25983228088813,"lon":120.9631115813002,"type":"Food & Drink","experiences":["region-pin26-exp0","region-pin26-exp1","region-pin26-exp2","region-pin26-exp3"]},{"pin_id":"region-pin27","label":"pin#27 of 60","lat":23.059195364498954,"lon":120.24373873086353,"type":"Amenities","experiences":["region-pin27-exp0","region-pin27-exp1","region-pin27-exp2","region-pin27-exp3"]},{"pin_id":"region-pin28","label":"pin#28 of 60","lat":24.874292983945132,"lon":121.5696311383145,"type":"Events / Experiences","experiences":["region-pin28-exp0"]},{"pin_id":"region-pin29","label":"pin#29 of 60","lat":24.394946415183533,"lon":120.89203758977213,"type":"Transport","experiences":["region-pin29-exp0","region-pin29-exp1","region-pin29-exp2","region-pin29-exp3"]},{"pin_id":"region-pin30","label":"pin#30 of 60","lat":23.65299176258398,"lon":120.06150016560971,"type":"Food & Drink","experiences":["region-pin30-exp0"]},{"pin_id":"region-pin31","label":"pin#31 of 60","lat":25.275235002720773,"lon":121.80174525779395,"type":"Events / Experiences","experiences":["region-pin31-exp0","region-pin31-exp1"]},{"pin_id":"region-pin32","label":"pin#32 of 60","lat":25.43644720664436,"lon":121.7783628614579,"type":"Events / Experiences","experiences":["region-pin32-exp0","region-pin32-exp1","region-pin32-exp2","region-pin32-exp3"]},{"pin_id":"region-pin33","label":"pin#33 of 60","lat":24.497496637369487,"lon":120.12253132506858,"type":"Amenities","experiences":["region-pin33-exp0","region-pin33-exp1","region-pin33-exp2","region-pin33-exp3"]},{"pin_id":"region-pin34","label":"pin#34 of 60","lat":21.498738101546227,"lon":120.19231753777018,"type":"Transport","experiences":["region-pin34-exp0","region-pin34-exp1","region-pin34-exp2","region-pin34-exp3"]},{"pin_id":"region-pin35","label":"pin#35 of 60","lat":23.9195128459174,"lon":120.77869229806457,"type":"Transport","experiences":["region-pin35-exp0","region-pin35-exp1","region-pin35-exp2"]},{"pin_id":"region-pin36","label":"pin#36 of 60","lat":25.01093944968801,"lon":120.76361700091286,"type":"Food & Drink","experiences":["region-pin36-exp0"]},{"pin_id":"region-pin37","label":"pin#37 of 60","lat":24.829492021831072,"lon":120.32933688626437,"type":"Food & Drink","experiences":["region-pin37-exp0"]},{"pin_id":"region-pin38","label":"pin#38 of 60","lat":21.532317277456,"lon":120.8279515733653,"type":"Transport","experiences":["region-pin38-exp0","region-pin38-exp1","region-pin38-exp2","region-pin38-exp3"]},{"pin_id":"region-pin39","label":"pin#39 of 60","lat":22.693813255494653,"lon":121.30610985611374,"type":"Amenities","experiences":["region-pin39-exp0","region-pin39-exp1"]},{"pin_id":"region-pin40","label":"pin#40 of 60","lat":21.15568882592343,"lon":121.17684451848467,"type":"Food & Drink","experiences":["region-pin40-exp0","region-pin40-exp1"]},{"pin_id":"region-pin41","label":"pin#41 of 60","lat":23.81562118604127,"lon":120.42604958293366,"type":"Amenities","experiences":["region-pin41-exp0","region-pin41-exp1","region-pin41-exp2","region-pin41-exp3"]},{"pin_id":"region-pin42","label":"pin#42 of 60","lat":21.540981450250655,"lon":120.48594663168059,"type":"Amenities","experiences":["region-pin42-exp0","region-pin42-exp1","region-pin42-exp2"]},{"pin_id":"region-pin43","label":"pin#43 of 60","lat":23.195120487991154,"lon":121.02375557922228,"type":"Food & Drink","experiences":["region-pin43-exp0","region-pin43-exp1"]},{"pin_id":"region-pin44","label":"pin#44 of 60","lat":23.43654874506365,"lon":121.19227846794323,"type":"Transport","experiences":["region-pin44-exp0","region-pin44-exp1","region-pin44-exp2","region-pin44-exp3"]},{"pin_id":"region-pin45","label":"pin#45 of 60","lat":21.961667785802987,"lon":120.35415885198036,"type":"Events / Experiences","experiences":["region-pin45-exp0","region-pin45-exp1"]},{"pin_id":"region-pin46","label":"pin#46 of 60","lat":23.20944859511021,"lon":120.79965227989605,"type":"Amenities","experiences":["region-pin46-exp0","region-pin46-exp1","region-pin46-exp2","region-pin46-exp3"]},{"pin_id":"region-pin47","label":"pin#47 of 60","lat":25.868654735358657,"lon":121.57194647195453,"type":"Transport","experiences":["region-pin47-exp0","region-pin47-exp1"]},{"pin_id":"region-pin48","label":"pin#48 of 60","lat":22.5700795429475,"lon":120.92296121526486,"type":"Events / Experiences","experiences":["region-pin48-exp0","region-pin48-exp1","region-pin48-exp2","region-pin48-exp3"]},{"pin_id":"region-pin49","label":"pin#49 of 60","lat":23.72912231015194,"lon":121.5527010486804,"type":"Food & Drink","experiences":["region-pin49-exp0","region-pin49-exp1","region-pin49-exp2","region-pin49-exp3"]},{"pin_id":"region-pin50","label":"pin#50 of 60","lat":25.946637772459383,"lon":121.94380040596782,"type":"Amenities","experiences":["region-pin50-exp0"]},{"pin_id":"region-pin51","label":"pin#51 of 60","lat":22.814164507991897,"lon":120.16412085213722,"type":"Food & Drink","experiences":["region-pin51-exp0","region-pin51-exp1","region-pin51-exp2"]},{"pin_id":"region-pin52","label":"pin#52 of 60","lat":22.821760338042886,"lon":120.40037300236975,"type":"Amenities","experiences":["region-pin52-exp0","region-pin52-exp1","region-pin52-exp2","region-pin52-exp3"]},{"pin_id":"region-pin53","label":"pin#53 of 60","lat":23.18060995246734,"lon":120.022738147264,"type":"Amenities","experiences":["region-pin53-exp0","region-pin53-exp1","region-pin53-exp2"]},{"pin_id":"region-pin54","label":"pin#54 of 60","lat":23.562922542831075,"lon":120.91014770516415,"type":"Transport","experiences":["region-pin54-exp0","region-pin54-exp1"]},{"pin_id":"region-pin55","label":"pin#55 of 60","lat":24.662473724693992,"lon":121.67388178694333,"type":"Transport","experiences":["region-pin55-exp0"]},{"pin_id":"region-pin56","label":"pin#56 of 60","lat":23.836278792552964,"lon":120.04515355333419,"type":"Transport","experiences":["region-pin56-exp0","region-pin56-exp1"]},{"pin_id":"region-pin57","label":"pin#57 of 60","lat":21.57813732420857,"lon":121.50935087419366,"type":"Transport","experiences":["region-pin57-exp0","region-pin57-exp1"]},{"pin_id":"region-pin58","label":"pin#58 of 60","lat":24.604451300816194,"lon":120.26901362254975,"type":"Events / Experiences","experiences":["region-pin58-exp0"]},{"pin_id":"region-pin59","label":"pin#59 of 60","lat":23.996358566556204,"lon":120.69813728300943,"type":"Food & Drink","experiences":["region-pin59-exp0"]}]}} diff --git a/views/pages/db.ejs b/views/pages/db.ejs deleted file mode 100644 index 27a5f49..0000000 --- a/views/pages/db.ejs +++ /dev/null @@ -1,23 +0,0 @@ - - - - <% include ../partials/header.ejs %> - - - - -<% include ../partials/nav.ejs %> - -
-

Database Results

- - - -
- - - diff --git a/views/pages/index.ejs b/views/pages/index.ejs deleted file mode 100644 index 4c39473..0000000 --- a/views/pages/index.ejs +++ /dev/null @@ -1,66 +0,0 @@ - - - - <% include ../partials/header.ejs %> - - - - - <% include ../partials/nav.ejs %> - -
-
- -

Getting Started with Node on Heroku

-

This is a sample Node application deployed to Heroku. It's a reasonably simple app - but a good foundation for understanding how to get the most out of the Heroku platform.

- Getting Started with Node - Source on GitHub -
-
-
- -
-
-
-

How this sample app works

-
    -
  • This app was deployed to Heroku, either using Git or by using Heroku Button on the repository.
  • - -
  • When Heroku received the source code, it fetched all the dependencies in the package.json, creating a deployable slug.
  • -
  • The platform then spins up a dyno, a lightweight container that provides an isolated environment in which the slug can be mounted and executed.
  • -
  • You can scale your app, manage it, and deploy over 150 add-on services, from the Dashboard or CLI.
  • -
-
-
-

Next Steps

-
    -
  • If you are following the Getting Started guide, then please head back to the tutorial and follow the next steps!
  • -
  • If you deployed this app by deploying the Heroku Button, then in a command line shell, run:
  • -
      -
    • git clone https://github.com/heroku/node-js-getting-started.git - this will create a local copy of the source code for the app
    • -
    • cd node-js-getting-started - change directory into the local source code repository
    • -
    • heroku git:remote -a <your-app-name> - associate the Heroku app with the repository
    • -
    • You'll now be set up to run the app locally, or deploy changes to Heroku
    • -
    -
-

Helpful Links

- -
-
- -
- - - - diff --git a/views/partials/header.ejs b/views/partials/header.ejs deleted file mode 100644 index bd0069f..0000000 --- a/views/partials/header.ejs +++ /dev/null @@ -1,5 +0,0 @@ -Node.js Getting Started on Heroku - - - - diff --git a/views/partials/nav.ejs b/views/partials/nav.ejs deleted file mode 100644 index 224b5e7..0000000 --- a/views/partials/nav.ejs +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/yarn.lock b/yarn.lock index 186a081..58b506c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,21 +7,110 @@ accepts@~1.2.12: mime-types "~2.1.6" negotiator "0.5.3" +ansi-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" + +bcrypt-pbkdf@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" + dependencies: + tweetnacl "^0.14.3" + +body-parser: + version "1.15.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.15.2.tgz#d7578cf4f1d11d5f6ea804cef35dc7a7ff6dae67" + dependencies: + bytes "2.4.0" + content-type "~1.0.2" + debug "~2.2.0" + depd "~1.1.0" + http-errors "~1.5.0" + iconv-lite "0.4.13" + on-finished "~2.3.0" + qs "6.2.0" + raw-body "~2.1.7" + type-is "~1.6.13" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +bytes@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" + canvas@^1.6.1: version "1.6.2" resolved "https://registry.yarnpkg.com/canvas/-/canvas-1.6.2.tgz#12b56e3f00e7880aa45e3aae59fe75237720aaa4" dependencies: nan "^2.4.0" +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +chalk@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + content-disposition@0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.0.tgz#4284fe6ae0630874639e44e80a418c2934135e9e" -content-type@~1.0.1: +content-type@~1.0.1, content-type@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" @@ -33,12 +122,28 @@ cookie@0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.1.3.tgz#e734a5c1417fce472d5aef82c381cabb64d1a435" +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + debug@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: ms "0.7.1" +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + depd@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/depd/-/depd-1.0.1.tgz#80aec64c9d6d97e65cc2a9caa93c0aa6abf73aaa" @@ -55,6 +160,12 @@ destroy@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.3.tgz#b433b4724e71fd8551d9885174851c5fc377e2c9" +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -67,6 +178,10 @@ escape-html@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.2.tgz#d77d32fa98e38c2f41ae85e9278e0e0e6ba1022c" +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + etag@~1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/etag/-/etag-1.7.0.tgz#03d30b5f67dd6e632d2945d30d6652731a34d5d8" @@ -101,6 +216,14 @@ express@4.13.3: utils-merge "1.0.0" vary "~1.0.1" +extend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + finalhandler@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-0.4.0.tgz#965a52d9e8d05d2b857548541fb89b53a2497d9b" @@ -110,6 +233,18 @@ finalhandler@0.4.0: on-finished "~2.3.0" unpipe "~1.0.0" +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + forwarded@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" @@ -118,6 +253,54 @@ fresh@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.3.0.tgz#651f838e22424e7566de161d8358caa199f83d4f" +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +getpass@^0.1.1: + version "0.1.6" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + dependencies: + assert-plus "^1.0.0" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + http-errors@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.3.1.tgz#197e22cdebd4198585e8694ef6786197b91ed942" @@ -125,7 +308,27 @@ http-errors@~1.3.1: inherits "~2.0.1" statuses "1" -inherits@~2.0.1: +http-errors@~1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.5.1.tgz#788c0d2c1de2c81b9e6e8c01843b6b97eb920750" + dependencies: + inherits "2.0.3" + setprototypeof "1.0.2" + statuses ">= 1.3.1 < 2" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +inherits@~2.0.1, inherits@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -133,6 +336,57 @@ ipaddr.js@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.0.5.tgz#5fa78cf301b825c78abc3042d812723049ea23c7" +is-my-json-valid@^2.12.4: + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +jsbn@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonpointer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" + +jsprim@^1.2.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" + dependencies: + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -149,6 +403,16 @@ mime-db@~1.24.0: version "1.24.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.24.0.tgz#e2d13f939f0016c6e4e9ad25a8652f126c467f0c" +mime-db@~1.25.0: + version "1.25.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" + +mime-types@^2.1.12, mime-types@~2.1.13, mime-types@~2.1.7: + version "2.1.13" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" + dependencies: + mime-db "~1.25.0" + mime-types@~2.1.11, mime-types@~2.1.6: version "2.1.12" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.12.tgz#152ba256777020dd4663f54c2e7bc26381e71729" @@ -185,6 +449,10 @@ negotiator@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.5.3.tgz#269d5c476810ec92edbe7b6c2f28316384f9a7e8" +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -199,6 +467,16 @@ path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + proxy-addr@~1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.0.10.tgz#0d40a82f801fc355567d2ecb65efe3f077f121c5" @@ -206,14 +484,59 @@ proxy-addr@~1.0.8: forwarded "~0.1.0" ipaddr.js "1.0.5" +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + qs@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/qs/-/qs-4.0.0.tgz#c31d9b74ec27df75e543a86c78728ed8d4623607" +qs@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.0.tgz#3b7848c03c2dece69a9522b0fae8c4126d745f3b" + range-parser@~1.0.2, range-parser@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.0.3.tgz#6872823535c692e2c2a0103826afd82c2e0ff175" +raw-body@~2.1.7: + version "2.1.7" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774" + dependencies: + bytes "2.4.0" + iconv-lite "0.4.13" + unpipe "1.0.0" + +request: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + send@0.13.0: version "0.13.0" resolved "https://registry.yarnpkg.com/send/-/send-0.13.0.tgz#518f921aeb0560aec7dcab2990b14cf6f3cce5de" @@ -256,13 +579,73 @@ serve-static@~1.10.0: parseurl "~1.3.1" send "0.13.2" +setprototypeof@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.2.tgz#81a552141ec104b88e89ce383103ad5c66564d08" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sshpk@^1.7.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +"statuses@>= 1.3.1 < 2", statuses@1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + statuses@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.2.1.tgz#dded45cc18256d51ed40aec142489d5c61026d28" -statuses@1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-is@~1.6.13: + version "1.6.14" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.14.tgz#e219639c17ded1ca0789092dd54a03826b817cb2" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.13" type-is@~1.6.6: version "1.6.13" @@ -271,7 +654,7 @@ type-is@~1.6.6: media-typer "0.3.0" mime-types "~2.1.11" -unpipe@~1.0.0: +unpipe@~1.0.0, unpipe@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -279,7 +662,21 @@ utils-merge@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" +uuid@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + vary@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/vary/-/vary-1.0.1.tgz#99e4981566a286118dfb2b817357df7993376d10" +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" +