clean up tests and add deploy sql
This commit is contained in:
		
							parent
							
								
									e2e7393bc9
								
							
						
					
					
						commit
						6aee63b36d
					
				
							
								
								
									
										10
									
								
								server.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								server.js
									
									
									
									
									
								
							| @ -43,7 +43,7 @@ Postgres.FirstRow = function(inSQL,args, inResponse) | ||||
| }; | ||||
| Postgres.connect(); | ||||
| 
 | ||||
| //----------------------------------------------------------source definitions------------------------------------------------------------
 | ||||
| //----------------------------------------------------------source definitions-------------------------------------------------------------------------------------------------------------------------
 | ||||
| 
 | ||||
| //returns array of all sources
 | ||||
| server.get("/source", function (inReq, inRes) | ||||
| @ -58,7 +58,7 @@ server.post("/source", bodyParser.json(), function (inReq, inRes)// remove body | ||||
|     Postgres.FirstRow(sql,[JSON.stringify(inReq.body)], inRes); | ||||
| }); | ||||
| 
 | ||||
| //----------------------------------------------------------regex instractions--------------------------------------------------------------------------
 | ||||
| //----------------------------------------------------------regex instrUctions-------------------------------------------------------------------------------------------------------------------------
 | ||||
| //list all regex operations
 | ||||
| server.get("/regex", function (inReq, inRes) | ||||
| { | ||||
| @ -73,7 +73,7 @@ server.post("/regex", bodyParser.json(), function (inReq, inRes) | ||||
|     Postgres.FirstRow(sql, [JSON.stringify(inReq.body)], inRes); | ||||
| }); | ||||
| 
 | ||||
| //------------------------------------------------------------mappings-------------------------------------------------------------------------------
 | ||||
| //------------------------------------------------------------mappings---------------------------------------------------------------------------------------------------------------------------------
 | ||||
| 
 | ||||
| //list unmapped items flagged to be mapped   ?srce=
 | ||||
| server.get("/unmapped", function (inReq, inRes) | ||||
| @ -90,7 +90,7 @@ server.post("/mapping", bodyParser.json(), function (inReq, inRes) | ||||
| }); | ||||
| 
 | ||||
| 
 | ||||
| //-------------------------------------------------------------import data--------------------------------------------------------------------------
 | ||||
| //-------------------------------------------------------------import data-----------------------------------------------------------------------------------------------------------------------------
 | ||||
| 
 | ||||
| server.use("/import", upload.single('upload'), function (inReq, inRes) { | ||||
| 
 | ||||
| @ -107,7 +107,7 @@ server.use("/import", upload.single('upload'), function (inReq, inRes) { | ||||
|     } | ||||
| ); | ||||
| 
 | ||||
| //-------------------------------------------------------------suggest source def--------------------------------------------------------------------------
 | ||||
| //-------------------------------------------------------------suggest source def----------------------------------------------------------------------------------------------------------------------
 | ||||
| 
 | ||||
| server.use("/csv_suggest", upload.single('upload'), function (inReq, inRes) { | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										0
									
								
								test/0.deploy/cmd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								test/0.deploy/cmd
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										1986
									
								
								test/0.deploy/schema.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1986
									
								
								test/0.deploy/schema.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -1 +1 @@ | ||||
| curl -H "Content-Type: application/json" -X POST -d@./srce.json http://localhost/srce_set | ||||
| curl -H "Content-Type: application/json" -X POST -d@./srce.json http://localhost/source | ||||
							
								
								
									
										1
									
								
								test/3.dcard_maps/curl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								test/3.dcard_maps/curl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| curl -H "Content-Type: application/json" -X POST -d@./mapping.json http://localhost/mapping | ||||
							
								
								
									
										4299
									
								
								test/3.dcard_maps/mapping.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4299
									
								
								test/3.dcard_maps/mapping.json
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1
									
								
								test/4.dcard_import/curl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								test/4.dcard_import/curl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| curl -v -F upload=@./d.csv http://localhost/import?srce=dcard | ||||
							
								
								
									
										139
									
								
								test/4.dcard_import/d.csv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										139
									
								
								test/4.dcard_import/d.csv
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,139 @@ | ||||
| Trans. Date,Post Date,Description,Amount,Category | ||||
| 01/02/2018,01/02/2018,"GOOGLE *YOUTUBE VIDEOS G.CO/HELPPAY#CAP0H07TXV",4.26,"Services" | ||||
| 01/02/2018,01/02/2018,"MICROSOFT *ONEDRIVE 800-642-7676 WA",4.26,"Services" | ||||
| 01/03/2018,01/03/2018,"CLE CLINIC PT PMTS 216-445-6249 OHAK2C57F2F0B3",200.00,"Medical Services" | ||||
| 01/04/2018,01/04/2018,"AT&T *PAYMENT 800-288-2020 TX",57.14,"Services" | ||||
| 01/04/2018,01/07/2018,"WWW.KOHLS.COM #0873 MIDDLETOWN OH",-7.90,"Payments and Credits" | ||||
| 01/05/2018,01/07/2018,"PIZZA HUT 007946 STOW OH",9.24,"Restaurants" | ||||
| 01/05/2018,01/07/2018,"SUBWAY 00044289255 STOW OH",10.25,"Restaurants" | ||||
| 01/06/2018,01/07/2018,"ACME NO. 17 STOW OH",103.98,"Supermarkets" | ||||
| 01/06/2018,01/07/2018,"DISCOUNT DRUG MART 32 STOW OH",1.69,"Merchandise" | ||||
| 01/06/2018,01/07/2018,"DISCOUNT DRUG MART 32 STOW OH",2.19,"Merchandise" | ||||
| 01/09/2018,01/09/2018,"CIRCLE K 05416 STOW OH00947R",3.94,"Gasoline" | ||||
| 01/09/2018,01/09/2018,"CIRCLE K 05416 STOW OH00915R",52.99,"Gasoline" | ||||
| 01/13/2018,01/13/2018,"AUTOZONE #0722 STOW OH",85.36,"Automotive" | ||||
| 01/13/2018,01/13/2018,"DISCOUNT DRUG MART 32 STOW OH",26.68,"Merchandise" | ||||
| 01/13/2018,01/13/2018,"EL CAMPESINO STOW OH",6.50,"Restaurants" | ||||
| 01/13/2018,01/13/2018,"TARGET STOW OH",197.90,"Merchandise" | ||||
| 01/14/2018,01/14/2018,"DISCOUNT DRUG MART 32 STOW OH",13.48,"Merchandise" | ||||
| 01/15/2018,01/15/2018,"TARGET.COM * 800-591-3869 MN",22.41,"Merchandise" | ||||
| 01/16/2018,01/16/2018,"BUFFALO WILD WINGS KENT KENT OH",63.22,"Restaurants" | ||||
| 01/16/2018,01/16/2018,"PARTA - KCG KENT OH",4.00,"Government Services" | ||||
| 01/16/2018,01/16/2018,"REMEMBERNHU 402-935-7733 IA",60.00,"Services" | ||||
| 01/16/2018,01/16/2018,"TARGET.COM * 800-591-3869 MN",44.81,"Merchandise" | ||||
| 01/16/2018,01/16/2018,"TREE CITY COFFEE & PASTR KENT OH",17.75,"Restaurants" | ||||
| 01/17/2018,01/17/2018,"BESTBUYCOM805526794885 888-BESTBUY MN",343.72,"Merchandise" | ||||
| 01/19/2018,01/19/2018,"DISCOUNT DRUG MART 32 STOW OH",5.98,"Merchandise" | ||||
| 01/19/2018,01/19/2018,"U-HAUL OF KENT-STOW KENT OH",15.88,"Travel/ Entertainment" | ||||
| 01/19/2018,01/19/2018,"WALMART GROCERY 800-966-6546 AR",5.99,"Supermarkets" | ||||
| 01/19/2018,01/19/2018,"WALMART GROCERY 800-966-6546 AR",17.16,"Supermarkets" | ||||
| 01/19/2018,01/19/2018,"WALMART GROCERY 800-966-6546 AR",500.97,"Supermarkets" | ||||
| 01/20/2018,01/20/2018,"GOOGLE *GOOGLE PLAY G.CO/HELPPAY#CAP0HFFS7W",2.12,"Services" | ||||
| 01/20/2018,01/20/2018,"LOWE'S OF STOW, OH. STOW OH",256.48,"Home Improvement" | ||||
| 01/22/2018,01/22/2018,"HOBBY LOBBY #405 STOW OHITEM TRANSFERRED FROM PREV ACCOUNT",38.49,"Merchandise" | ||||
| 01/23/2018,01/23/2018,"CASHBACK BONUS REDEMPTION PYMT/STMT CRDT",-32.20,"Awards and Rebate Credits" | ||||
| 01/23/2018,01/23/2018,"INTERNET PAYMENT - THANK YOU",-2394.51,"Payments and Credits" | ||||
| 01/27/2018,01/27/2018,"GIANT-EAGLE #4096 STOW OH",67.81,"Supermarkets" | ||||
| 01/27/2018,01/27/2018,"OFFICEMAX/OFFICE DEPOT63 STOW OH",21.06,"Merchandise" | ||||
| 01/27/2018,01/27/2018,"TARGET STOW OH",71.00,"Merchandise" | ||||
| 01/29/2018,01/29/2018,"NETFLIX.COM NETFLIX.COM CA19899514437",14.93,"Services" | ||||
| 01/30/2018,01/30/2018,"PARTA - KCG KENT OH",1.00,"Government Services" | ||||
| 01/30/2018,01/30/2018,"SPEEDWAY 09303 KEN KENT OH",46.57,"Gasoline" | ||||
| 01/30/2018,01/30/2018,"SQ *TWISTED MELTZ KENT OH0002305843011416898511",16.87,"Restaurants" | ||||
| 01/30/2018,01/30/2018,"TARGET STOW OH",49.37,"Merchandise" | ||||
| 01/31/2018,01/31/2018,"TARGET STOW OH",4.14,"Merchandise" | ||||
| 01/31/2018,01/31/2018,"TARGET STREETSBORO OH",14.28,"Merchandise" | ||||
| 01/31/2018,02/01/2018,"TARGET STOW OH",-21.34,"Payments and Credits" | ||||
| 01/31/2018,02/01/2018,"TARGET STREETSBORO OH",-9.60,"Payments and Credits" | ||||
| 02/01/2018,02/01/2018,"EL CAMPESINO STOW OH",42.24,"Restaurants" | ||||
| 02/02/2018,02/02/2018,"CASH ADVANCE FEE",5.00,"Fees" | ||||
| 02/02/2018,02/02/2018,"GOOGLE *ASCIIFLOW.COM G.CO/HELPPAY#CAP0HQTYN5",5.00,"Cash Advances" | ||||
| 02/03/2018,02/03/2018,"TARGET STREETSBORO OH",71.69,"Merchandise" | ||||
| 02/03/2018,02/07/2018,"SAMS CLUB - #4750 CUYAHOGA FALLOH",371.90,"Warehouse Clubs" | ||||
| 02/04/2018,02/04/2018,"ACME NO. 17 STOW OH",8.98,"Supermarkets" | ||||
| 02/04/2018,02/04/2018,"MICROSOFT *ONEDRIVE 800-642-7676 WA",4.26,"Services" | ||||
| 02/06/2018,02/06/2018,"MINIMUM INTEREST CHARGE FEE",0.50,"Fees" | ||||
| 02/06/2018,02/07/2018,"BP#954778736210 7-ELEVEN STOW OH",52.80,"Gasoline" | ||||
| 02/06/2018,02/07/2018,"CVS/PHARMACY #08932 TWINSBURG OH",13.87,"Merchandise" | ||||
| 02/07/2018,02/07/2018,"AT&T *PAYMENT 800-288-2020 TXX51Z5QX7SMT2U01",57.14,"Services" | ||||
| 02/07/2018,02/07/2018,"TOYS R US #9203 CUYAHOGA FALLOH",193.32,"Merchandise" | ||||
| 02/08/2018,02/08/2018,"GIANT-EAGLE #4096 STOW OH",66.13,"Supermarkets" | ||||
| 02/08/2018,02/08/2018,"TARGET STOW OH",121.32,"Merchandise" | ||||
| 02/09/2018,02/09/2018,"GUIDOS ORIGINAL PIZZA KENT OH",11.75,"Restaurants" | ||||
| 02/09/2018,02/09/2018,"MARATHON PETRO73601 TWINSBURG OH",44.30,"Gasoline" | ||||
| 02/10/2018,02/10/2018,"RSVP NO. 36 STOW OH",14.43,"Supermarkets" | ||||
| 02/10/2018,02/10/2018,"TARGET STOW OH",77.90,"Merchandise" | ||||
| 02/11/2018,02/11/2018,"SUBWAY 00044289255 STOW OH",21.00,"Restaurants" | ||||
| 02/13/2018,02/13/2018,"CHICK-FIL-A #02197 CUYAHOGA FLS OH",12.79,"Restaurants" | ||||
| 02/13/2018,02/13/2018,"IN *MR. BULKY'S FOODS AKRON OHAJ16V8Q6",3.39,"Supermarkets" | ||||
| 02/13/2018,02/13/2018,"TARGET CUYAHOGA FALLOH",5.33,"Supermarkets" | ||||
| 02/14/2018,02/14/2018,"DISCOUNT DRUG MART 32 STOW OH",4.29,"Merchandise" | ||||
| 02/14/2018,02/14/2018,"HANDELS ICE CREAM STOW STOW OH",7.95,"Supermarkets" | ||||
| 02/15/2018,02/15/2018,"BATH&BODY STOW OH",47.19,"Merchandise" | ||||
| 02/15/2018,02/15/2018,"TARGET STOW OH",76.35,"Merchandise" | ||||
| 02/17/2018,02/17/2018,"EL CAMPESINO STOW OH",6.50,"Restaurants" | ||||
| 02/17/2018,02/17/2018,"WALMART GROCERY 800-966-6546 AR",461.36,"Supermarkets" | ||||
| 02/18/2018,02/18/2018,"ACME NO. 17 STOW OH",32.68,"Supermarkets" | ||||
| 02/18/2018,02/18/2018,"CHIPOTLE ONLINE 303-595-4000 CO",20.75,"Restaurants" | ||||
| 02/19/2018,02/19/2018,"GIANT EAGLE #5863 STREETSBORO OH",25.00,"Supermarkets" | ||||
| 02/20/2018,02/20/2018,"REMEMBERNHU 402-935-7733 IA",60.00,"Services" | ||||
| 02/21/2018,02/21/2018,"BP#954635936241 7-ELEVEN STOW OH",30.04,"Gasoline" | ||||
| 02/22/2018,02/22/2018,"CHICK-FIL-A #02197 CUYAHOGA FLS OH",3.19,"Restaurants" | ||||
| 02/22/2018,02/22/2018,"CHICK-FIL-A #02197 CUYAHOGA FLS OH",18.22,"Restaurants" | ||||
| 02/22/2018,02/22/2018,"PET SUPPLIES PLUS #68 STOW OH",45.88,"Merchandise" | ||||
| 02/22/2018,02/22/2018,"TOYS R US #9203 CUYAHOGA FALLOH",21.31,"Merchandise" | ||||
| 02/23/2018,02/23/2018,"SUMMIT CO PARKING GAR AKRON OH",6.00,"Services" | ||||
| 02/24/2018,02/24/2018,"GET GO #3396 STOW OH",26.46,"Gasoline" | ||||
| 02/25/2018,02/25/2018,"DISCOUNT DRUG MART 32 STOW OH",19.70,"Merchandise" | ||||
| 02/25/2018,02/25/2018,"EL CAMPESINO STOW OH",6.50,"Restaurants" | ||||
| 02/25/2018,02/25/2018,"SQ *CORNER CUP COFFEEH STOW OH0001152921507942036274",2.30,"Supermarkets" | ||||
| 02/25/2018,02/25/2018,"TARGET STOW OH",18.49,"Merchandise" | ||||
| 02/28/2018,02/28/2018,"NETFLIX.COM NETFLIX.COM CA20475539512",14.93,"Services" | ||||
| 03/01/2018,03/01/2018,"GIANT-EAGLE #4032 STOW OH",2.99,"Supermarkets" | ||||
| 03/01/2018,03/01/2018,"TARGET STOW OH",72.46,"Merchandise" | ||||
| 03/02/2018,03/02/2018,"LATE FEE",27.00,"Fees" | ||||
| 03/02/2018,03/02/2018,"MICROSOFT *ONEDRIVE 800-642-7676 WA",4.26,"Services" | ||||
| 03/02/2018,03/02/2018,"PIZZA HUT 007946 STOW OH",9.89,"Restaurants" | ||||
| 03/03/2018,03/03/2018,"CASHBACK BONUS REDEMPTION PYMT/STMT CRDT",-23.28,"Awards and Rebate Credits" | ||||
| 03/03/2018,03/03/2018,"INTERNET PAYMENT - THANK YOU",-2451.43,"Payments and Credits" | ||||
| 03/03/2018,03/03/2018,"LOWE'S OF STOW, OH. STOW OH",6.93,"Home Improvement" | ||||
| 03/03/2018,03/07/2018,"WAL-MART SC - #2323 STOW OH",150.32,"Merchandise" | ||||
| 03/04/2018,03/04/2018,"OLD NAVY ON-LINE 800-OLDNAVY OH",13.66,"Merchandise" | ||||
| 03/06/2018,03/07/2018,"MFW BOOKS LLC 5732022000 MO",86.90,"Education" | ||||
| 03/06/2018,03/07/2018,"OLD NAVY ON-LINE 800-OLDNAVY OH",127.46,"Merchandise" | ||||
| 03/08/2018,03/08/2018,"ACME NO. 17 STOW OH",8.58,"Supermarkets" | ||||
| 03/08/2018,03/08/2018,"CHICK-FIL-A #02197 CUYAHOGA FLS OH",2.12,"Restaurants" | ||||
| 03/08/2018,03/08/2018,"EL CAMPESINO STOW OH",6.50,"Restaurants" | ||||
| 03/08/2018,03/08/2018,"SPEEDWAY 03686 496 STOW OH",45.24,"Gasoline" | ||||
| 03/08/2018,03/08/2018,"SWENSONS STOW KENT STOW OH",8.30,"Restaurants" | ||||
| 03/08/2018,03/08/2018,"TOYS R US #9203 CUYAHOGA FALLOH",5.33,"Merchandise" | ||||
| 03/09/2018,03/09/2018,"SPEEDWAY 03686 496 STOW OH",48.29,"Gasoline" | ||||
| 03/10/2018,03/10/2018,"WALMART GROCERY 800-966-6546 AR",522.22,"Supermarkets" | ||||
| 03/11/2018,03/11/2018,"AT&T *PAYMENT 800-288-2020 TXQ8F55RY7SMT2N04",57.14,"Services" | ||||
| 03/11/2018,03/11/2018,"SQ *CORNER CUP COFFEEH STOW OH0002305843011470140810",2.30,"Supermarkets" | ||||
| 03/12/2018,03/12/2018,"MICROSOFT *STORE 800-642-7676 WA",1.06,"Services" | ||||
| 03/15/2018,03/15/2018,"SQ *CORNER CUP COFFEEH STOW OH0002305843011475075512",2.30,"Supermarkets" | ||||
| 03/16/2018,03/16/2018,"ACME NO. 17 STOW OH",15.85,"Supermarkets" | ||||
| 03/16/2018,03/16/2018,"CHIPOTLE 1152 STOW OH",3.85,"Restaurants" | ||||
| 03/16/2018,03/16/2018,"EL CAMPESINO STOW OH",6.50,"Restaurants" | ||||
| 03/16/2018,03/16/2018,"PIZZA HUT 007946 STOW OH",13.98,"Restaurants" | ||||
| 03/17/2018,03/17/2018,"CHIPOTLE ONLINE 303-595-4000 CO",15.75,"Restaurants" | ||||
| 03/17/2018,03/17/2018,"DISCOUNT DRUG MART 32 STOW OH",9.89,"Merchandise" | ||||
| 03/17/2018,03/17/2018,"MFW BOOKS LLC 5732022000 MO",66.75,"Education" | ||||
| 03/18/2018,03/18/2018,"ACME NO. 17 STOW OH",27.78,"Supermarkets" | ||||
| 03/18/2018,03/18/2018,"GIANT-EAGLE #4032 STOW OH",28.34,"Supermarkets" | ||||
| 03/20/2018,03/20/2018,"REMEMBERNHU 402-935-7733 IA",60.00,"Services" | ||||
| 03/20/2018,03/20/2018,"SONLIGHT CURRICULUM LTD 303-730-8193 CO",762.87,"Education" | ||||
| 03/21/2018,03/21/2018,"BP#954635936241 7-ELEVEN STOW OH",8.87,"Gasoline" | ||||
| 03/21/2018,03/21/2018,"DISCOUNT DRUG MART 32 STOW OH",18.07,"Merchandise" | ||||
| 03/21/2018,03/21/2018,"SQ *CORNER CUP COFFEEH STOW OH0002305843011484061091",2.30,"Supermarkets" | ||||
| 03/21/2018,03/21/2018,"TARGET STOW OH",1.95,"Merchandise" | ||||
| 03/21/2018,03/21/2018,"TARGET STOW OH",224.85,"Merchandise" | ||||
| 03/22/2018,03/22/2018,"JUSTICE #0639 STOW OH",16.01,"Merchandise" | ||||
| 03/22/2018,03/22/2018,"SPEEDWAY 03686 496 STOW OH",32.54,"Gasoline" | ||||
| 03/22/2018,03/22/2018,"SQ *TWISTED MELTZ KENT OH0002305843011486528725",6.74,"Restaurants" | ||||
| 03/22/2018,03/22/2018,"TARGET STOW OH",6.60,"Merchandise" | ||||
| 03/25/2018,03/25/2018,"ACME NO. 17 STOW OH",95.42,"Supermarkets" | ||||
| 03/25/2018,03/25/2018,"ASIAN-GREEK CUISINES STOW OH",70.25,"Restaurants" | ||||
| 03/25/2018,03/25/2018,"MARATHON PETRO73601 TWINSBURG OH",11.09,"Gasoline" | ||||
| 03/25/2018,03/25/2018,"SPEEDWAY 09303 KEN KENT OH",53.28,"Gasoline" | ||||
| 
 | 
		Loading…
	
		Reference in New Issue
	
	Block a user