├── Chapter01 └── Figure1-1.png ├── Chapter02 ├── Figure2-1.png ├── Figure2-10.png ├── Figure2-11.png ├── Figure2-12.png ├── Figure2-13.png ├── Figure2-14.png ├── Figure2-15.png ├── Figure2-16.png ├── Figure2-17.png ├── Figure2-18.png ├── Figure2-19.png ├── Figure2-2.png ├── Figure2-20.png ├── Figure2-21.png ├── Figure2-22.png ├── Figure2-23.png ├── Figure2-24.png ├── Figure2-25.png ├── Figure2-26.png ├── Figure2-27.png ├── Figure2-28.png ├── Figure2-29.png ├── Figure2-3.png ├── Figure2-30.png ├── Figure2-31.png ├── Figure2-32.png ├── Figure2-33.png ├── Figure2-34.png ├── Figure2-35.png ├── Figure2-36.png ├── Figure2-37.png ├── Figure2-38.png ├── Figure2-39.png ├── Figure2-4.png ├── Figure2-40.png ├── Figure2-41.png ├── Figure2-42.png ├── Figure2-5.png ├── Figure2-6.png ├── Figure2-7.png ├── Figure2-8.png ├── Figure2-9.png ├── atmdefs.sql └── atmlocations.sql ├── Chapter03 ├── Figure3-1.png ├── Figure3-10.png ├── Figure3-11.png ├── Figure3-12.png ├── Figure3-13.png ├── Figure3-14.png ├── Figure3-15.png ├── Figure3-16.png ├── Figure3-17.png ├── Figure3-18.png ├── Figure3-19.png ├── Figure3-2.png ├── Figure3-20.png ├── Figure3-21.png ├── Figure3-3.png ├── Figure3-4.png ├── Figure3-5.png ├── Figure3-6.png ├── Figure3-7.png ├── Figure3-8.png ├── Figure3-9.png ├── NodeJS_Angular_Script.sh └── node-api │ ├── app.js │ ├── bin │ └── www │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── index.html │ ├── javascripts │ │ └── app.js │ └── stylesheets │ │ └── style.css │ ├── queries.js │ ├── routes │ ├── index.js │ └── users.js │ ├── test │ └── test.js │ └── views │ ├── error.jade │ ├── index.jade │ └── layout.jade ├── Chapter04 ├── Django_Script.sh ├── Figure4-1.png ├── Figure4-10.png ├── Figure4-11.png ├── Figure4-12.png ├── Figure4-13.png ├── Figure4-14.png ├── Figure4-15.png ├── Figure4-16.png ├── Figure4-17.png ├── Figure4-18.png ├── Figure4-19.png ├── Figure4-2.png ├── Figure4-20.png ├── Figure4-21.png ├── Figure4-22.png ├── Figure4-3.png ├── Figure4-4.png ├── Figure4-5.png ├── Figure4-6.png ├── Figure4-7.png ├── Figure4-8.png └── Figure4-9.png ├── Chapter05 ├── Figure5-1.png ├── Figure5-10.png ├── Figure5-11.png ├── Figure5-12.png ├── Figure5-13.png ├── Figure5-14.png ├── Figure5-15.png ├── Figure5-16.png ├── Figure5-17.png ├── Figure5-18.png ├── Figure5-19.png ├── Figure5-2.png ├── Figure5-20.png ├── Figure5-21.png ├── Figure5-22.png ├── Figure5-3.png ├── Figure5-4.png ├── Figure5-5.png ├── Figure5-6.png ├── Figure5-7.png ├── Figure5-8.png ├── Figure5-9.png ├── PostGIS Installation on AWS.sql ├── QGIS queries.sql └── zipcoordinates.sql ├── Chapter06 ├── Currencies.sql ├── FX-Schema.sql ├── Figure6-1.png ├── Figure6-10.png ├── Figure6-11.png ├── Figure6-12.png ├── Figure6-13.png ├── Figure6-14.png ├── Figure6-15.png ├── Figure6-16.png ├── Figure6-17.png ├── Figure6-18.png ├── Figure6-19.png ├── Figure6-2.png ├── Figure6-20.png ├── Figure6-21.png ├── Figure6-22.png ├── Figure6-23.png ├── Figure6-24.png ├── Figure6-25.png ├── Figure6-26.png ├── Figure6-27.png ├── Figure6-28.png ├── Figure6-29.png ├── Figure6-3.png ├── Figure6-30.png ├── Figure6-31.png ├── Figure6-32.png ├── Figure6-33.png ├── Figure6-34.png ├── Figure6-35.png ├── Figure6-36.png ├── Figure6-37.png ├── Figure6-38.png ├── Figure6-39.png ├── Figure6-4.png ├── Figure6-40.png ├── Figure6-41.png ├── Figure6-42.png ├── Figure6-5.png ├── Figure6-6.png ├── Figure6-7.png ├── Figure6-8.png ├── Figure6-9.png ├── Script 1 - Docker.sh ├── Script 10 - Expiration token.sh ├── Script 11 - User revocation.sql ├── Script 12 - Revocation token.sh ├── Script 13 - PostgREST as a service.sh ├── Script 2 - PostgREST binary release.sh ├── Script 3 - User Role.sql ├── Script 4 - Configuration file.sh ├── Script 5 - Basic API.sh ├── Script 6 - Add a Trusted User.sql ├── Script 7 - Make a Secret.sh ├── Script 8 - Successful insertion.sh ├── Script 9 - Expiration epoch.sql ├── USDCAD_Jan2020_Jun2020.sql ├── USDEUR_Jan2020_Jun2020.sql └── USDGBP_Jan2020_Jun2020.sql ├── Chapter07 ├── Figure7-1.png ├── Figure7-10.png ├── Figure7-11.png ├── Figure7-12.png ├── Figure7-13.png ├── Figure7-14.png ├── Figure7-15.png ├── Figure7-16.png ├── Figure7-17.png ├── Figure7-18.png ├── Figure7-19.png ├── Figure7-2.png ├── Figure7-20.png ├── Figure7-21.png ├── Figure7-22.png ├── Figure7-23.png ├── Figure7-24.png ├── Figure7-25.png ├── Figure7-26.png ├── Figure7-27.png ├── Figure7-28.png ├── Figure7-29.png ├── Figure7-3.png ├── Figure7-30.png ├── Figure7-31.png ├── Figure7-32.png ├── Figure7-33.png ├── Figure7-34.png ├── Figure7-35.png ├── Figure7-36.png ├── Figure7-37.png ├── Figure7-38.png ├── Figure7-39.png ├── Figure7-4.png ├── Figure7-40.png ├── Figure7-41.png ├── Figure7-42.png ├── Figure7-43.png ├── Figure7-44.png ├── Figure7-5.png ├── Figure7-6.png ├── Figure7-7.png ├── Figure7-8.png ├── Figure7-9.png ├── main.tf └── postgresdata.yml ├── Chapter09 ├── Figure9-1.png ├── Figure9-10.png ├── Figure9-11.png ├── Figure9-12.png ├── Figure9-13.png ├── Figure9-14.png ├── Figure9-15.png ├── Figure9-16.png ├── Figure9-17.png ├── Figure9-18.png ├── Figure9-19.png ├── Figure9-2.png ├── Figure9-20.png ├── Figure9-21.png ├── Figure9-22.png ├── Figure9-23.png ├── Figure9-24.png ├── Figure9-25.png ├── Figure9-26.png ├── Figure9-27.png ├── Figure9-28.png ├── Figure9-29.png ├── Figure9-3.png ├── Figure9-30.png ├── Figure9-31.png ├── Figure9-32.png ├── Figure9-33.png ├── Figure9-34.png ├── Figure9-35.png ├── Figure9-36.png ├── Figure9-37.png ├── Figure9-38.png ├── Figure9-39.png ├── Figure9-4.png ├── Figure9-40.png ├── Figure9-5.png ├── Figure9-6.png ├── Figure9-7.png ├── Figure9-8.png └── Figure9-9.png ├── LICENSE └── README.md /Chapter01/Figure1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter01/Figure1-1.png -------------------------------------------------------------------------------- /Chapter02/Figure2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-1.png -------------------------------------------------------------------------------- /Chapter02/Figure2-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-10.png -------------------------------------------------------------------------------- /Chapter02/Figure2-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-11.png -------------------------------------------------------------------------------- /Chapter02/Figure2-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-12.png -------------------------------------------------------------------------------- /Chapter02/Figure2-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-13.png -------------------------------------------------------------------------------- /Chapter02/Figure2-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-14.png -------------------------------------------------------------------------------- /Chapter02/Figure2-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-15.png -------------------------------------------------------------------------------- /Chapter02/Figure2-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-16.png -------------------------------------------------------------------------------- /Chapter02/Figure2-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-17.png -------------------------------------------------------------------------------- /Chapter02/Figure2-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-18.png -------------------------------------------------------------------------------- /Chapter02/Figure2-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-19.png -------------------------------------------------------------------------------- /Chapter02/Figure2-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-2.png -------------------------------------------------------------------------------- /Chapter02/Figure2-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-20.png -------------------------------------------------------------------------------- /Chapter02/Figure2-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-21.png -------------------------------------------------------------------------------- /Chapter02/Figure2-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-22.png -------------------------------------------------------------------------------- /Chapter02/Figure2-23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-23.png -------------------------------------------------------------------------------- /Chapter02/Figure2-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-24.png -------------------------------------------------------------------------------- /Chapter02/Figure2-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-25.png -------------------------------------------------------------------------------- /Chapter02/Figure2-26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-26.png -------------------------------------------------------------------------------- /Chapter02/Figure2-27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-27.png -------------------------------------------------------------------------------- /Chapter02/Figure2-28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-28.png -------------------------------------------------------------------------------- /Chapter02/Figure2-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-29.png -------------------------------------------------------------------------------- /Chapter02/Figure2-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-3.png -------------------------------------------------------------------------------- /Chapter02/Figure2-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-30.png -------------------------------------------------------------------------------- /Chapter02/Figure2-31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-31.png -------------------------------------------------------------------------------- /Chapter02/Figure2-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-32.png -------------------------------------------------------------------------------- /Chapter02/Figure2-33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-33.png -------------------------------------------------------------------------------- /Chapter02/Figure2-34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-34.png -------------------------------------------------------------------------------- /Chapter02/Figure2-35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-35.png -------------------------------------------------------------------------------- /Chapter02/Figure2-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-36.png -------------------------------------------------------------------------------- /Chapter02/Figure2-37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-37.png -------------------------------------------------------------------------------- /Chapter02/Figure2-38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-38.png -------------------------------------------------------------------------------- /Chapter02/Figure2-39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-39.png -------------------------------------------------------------------------------- /Chapter02/Figure2-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-4.png -------------------------------------------------------------------------------- /Chapter02/Figure2-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-40.png -------------------------------------------------------------------------------- /Chapter02/Figure2-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-41.png -------------------------------------------------------------------------------- /Chapter02/Figure2-42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-42.png -------------------------------------------------------------------------------- /Chapter02/Figure2-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-5.png -------------------------------------------------------------------------------- /Chapter02/Figure2-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-6.png -------------------------------------------------------------------------------- /Chapter02/Figure2-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-7.png -------------------------------------------------------------------------------- /Chapter02/Figure2-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-8.png -------------------------------------------------------------------------------- /Chapter02/Figure2-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter02/Figure2-9.png -------------------------------------------------------------------------------- /Chapter02/atmdefs.sql: -------------------------------------------------------------------------------- 1 | CREATE SEQUENCE public."ATM locations_ID_seq" 2 | INCREMENT 1 3 | START 658 4 | MINVALUE 1 5 | MAXVALUE 2147483647 6 | CACHE 1; 7 | 8 | ALTER SEQUENCE public."ATM locations_ID_seq" 9 | OWNER TO dba; 10 | 11 | GRANT ALL ON SEQUENCE public."ATM locations_ID_seq" TO dba; 12 | 13 | CREATE TABLE public."ATM locations" 14 | ( 15 | "ID" integer NOT NULL DEFAULT nextval('"ATM locations_ID_seq"'::regclass), 16 | "BankName" character varying(60) COLLATE pg_catalog."default" NOT NULL, 17 | "Address" character varying(50) COLLATE pg_catalog."default" NOT NULL, 18 | "County" character varying(15) COLLATE pg_catalog."default" NOT NULL, 19 | "City" character varying(15) COLLATE pg_catalog."default" NOT NULL, 20 | "State" character(2) COLLATE pg_catalog."default" NOT NULL, 21 | "ZipCode" integer NOT NULL, 22 | CONSTRAINT "ATM locations_pkey" PRIMARY KEY ("ID") 23 | ) 24 | 25 | TABLESPACE pg_default; 26 | 27 | ALTER TABLE public."ATM locations" 28 | OWNER to dba; 29 | 30 | GRANT ALL ON TABLE public."ATM locations" TO dba; 31 | 32 | COMMENT ON TABLE public."ATM locations" 33 | IS 'ATM locations of New York city'; 34 | -------------------------------------------------------------------------------- /Chapter02/atmlocations.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO public."ATM locations"("BankName","Address","County","City","State","ZipCode") 2 | VALUES('Wells Fargo ATM','500 W 30 STREET','New York','New York','NY',1000), 3 | ('JPMorgan Chase Bank, National Association','1260 Broadway','New York','New York','NY',10001), 4 | ('Sterling National Bank of New York','1261 Fifth Avenue','New York','New York','NY',10001), 5 | ('Bank of America N.A. GA1-006-15-40','1293 Broadway','New York','New York','NY',10001), 6 | ('Bank of Hope','16 West 32nd Street','New York','New York','NY',10001), 7 | ('TD Bank N.A.','200 West 26th Street','New York','New York','NY',10001), 8 | ('Citibank N. A.','201 West 34th Street','New York','New York','NY',10001), 9 | ('Capital One, N.A.','215 West 34th Street','New York','New York','NY',10001), 10 | ('Citibank N. A.','22 West 32nd Street','New York','New York','NY',10001), 11 | ('Sterling National Bank of New York','227 West 27th Street','New York','New York','NY',10001), 12 | ('JPMorgan Chase Bank, National Association','245 Seventh Avenue','New York','New York','NY',10001), 13 | ('Amalgamated Bank','275 Seventh Avenue','New York','New York','NY',10001), 14 | ('JPMorgan Chase Bank, National Association','305 Seventh Avenue','New York','New York','NY',10001), 15 | ('Woori America Bank','330 Fifth Avenue','New York','New York','NY',10001), 16 | ('Commerce Bank, N.A.','341 Ninth Avenue','New York','New York','NY',10001), 17 | ('TD Bank N.A.','350 West 31st Street','New York','New York','NY',10001), 18 | ('USAlliance Financial','350 West 31st Street','New York','New York','NY',10001), 19 | ('Bank of America N.A. GA1-006-15-40','358 Fifth Avenue','New York','New York','NY',10001), 20 | ('Sterling National Bank of New York','406 West 31st Street','New York','New York','NY',10001), 21 | ('Sterling National Bank of New York','7 Penn Plaza','New York','New York','NY',10001), 22 | ('Bank of America N.A. GA1-006-15-40','800 Avenue of the Americas','New York','New York','NY',10001), 23 | ('HSBC Bank USA, National Association','800 Avenue of the Americas','New York','New York','NY',10001), 24 | ('TD Bank N.A.','885 Sixth Avenue','New York','New York','NY',10001), 25 | ('BankUnited, NA','960 Avenue of the Americas','New York','New York','NY',10001), 26 | ('TD Bank N.A.','Five Penn Plaza','New York','New York','NY',10001), 27 | ('JPMorgan Chase Bank, National Association','109 Delancy Street','New York','New York','NY',10002), 28 | ('First American International Bank','123 EAST BROADWAY','New York','New York','NY',10002), 29 | ('Banco Popular North America','134 Delancy Street','New York','New York','NY',10002), 30 | ('Cathay Bank','16-18 East Broadway','New York','New York','NY',10002), 31 | ('First American International Bank','240 Grand Street','New York','New York','NY',10002), 32 | ('First American International Bank','29 Bowery','New York','New York','NY',10002), 33 | ('HSBC Bank USA, National Association','307 Grand Street','New York','New York','NY',10002), 34 | ('Banco Popular North America','310 Houston Street','New York','New York','NY',10002), 35 | ('TD Bank N.A.','314 Grand Street','New York','New York','NY',10002), 36 | ('Bank of America N.A. GA1-006-15-40','318 Grand Street','New York','New York','NY',10002), 37 | ('Citibank N. A.','411 Grand Street','New York','New York','NY',10002), 38 | ('Apple Bank For Savings','465 Grand Street','New York','New York','NY',10002), 39 | ('East West Bank','77 Bowery','New York','New York','NY',10002), 40 | ('Bank of America N.A. GA1-006-15-40','92 Delancey Street','New York','New York','NY',10002), 41 | ('Valley National Bank','93 Canal Street','New York','New York','NY',10002), 42 | ('Amalgamated Bank','10 East 14th Street','New York','New York','NY',10003), 43 | ('Wells Fargo ATM','104 EAST 14TH STREET','New York','New York ','NY',10003), 44 | ('Apple Bank For Savings','105 Second Avenue','New York','New York','NY',10003), 45 | ('Valley National Bank','111 Fourth Avenue','New York','New York','NY',10003), 46 | ('HSBC Bank USA, National Association','143 Second Avenue','New York','New York','NY',10003), 47 | ('HSBC Bank USA, National Association','15 Union Square West','New York','New York','NY',10003), 48 | ('JPMorgan Chase Bank, National Association','156 Second Avenue','New York','New York','NY',10003), 49 | ('Capital One, N.A.','159 Second Avenue','New York','New York','NY',10003), 50 | ('Commerce Bank, N.A.','1st Avenue & 16th Street','New York','New York','NY',10003), 51 | ('Signature Bank','200 Park Avenue South','New York','New York','NY',10003), 52 | ('TD Bank N.A.','21 East First Street','New York','New York','NY',10003), 53 | ('Flushing Bank, FB','225 Park Avenue South','New York','New York','NY',10003), 54 | ('JPMorgan Chase Bank, National Association','230 Park Avenue South','New York','New York','NY',10003), 55 | ('JPMorgan Chase Bank, National Association','233 Third Avenue','New York','New York','NY',10003), 56 | ('Bank of America N.A. GA1-006-15-40','240 Park Avenue South','New York','New York','NY',10003), 57 | ('JPMorgan Chase Bank, National Association','255-57 First Avenue','New York','New York','NY',10003), 58 | ('JPMorgan Chase Bank, National Association','26 Astor Place','New York','New York','NY',10003), 59 | ('JPMorgan Chase Bank, National Association','305 Bowery','New York','New York','NY',10003), 60 | ('Ponce De Leon Federal Bank','319 1st Avenue','New York','New York','NY',10003), 61 | ('JPMorgan Chase Bank, National Association','32 University Place','New York','New York','NY',10003), 62 | ('TD Bank N.A.','329 First Avenue','New York','New York','NY',10003), 63 | ('Bank of America N.A. GA1-006-15-40','36 East 14th Street','New York','New York','NY',10003), 64 | ('Apple Bank For Savings','4 Irving Place','New York','New York','NY',10003), 65 | ('TD Bank N.A.','46 Third Avenue','New York','New York','NY',10003), 66 | ('Commerce Bank, N.A.','47 Third Avenue','New York','New York','NY',10003), 67 | ('Citibank N. A.','52 East 14th Street','New York','New York','NY',10003), 68 | ('JPMorgan Chase Bank, National Association','69 Fifth Avenue','New York','New York','NY',10003), 69 | ('Bank of America N.A. GA1-006-15-40','72 Second Avenue','New York','New York','NY',10003), 70 | ('Citibank N. A.','749 Broadway','New York','New York','NY',10003), 71 | ('HSBC Bank USA, National Association','769 Broadway','New York','New York','NY',10003), 72 | ('Bank of America N.A. GA1-006-15-40','770 Broadway','New York','New York','NY',10003), 73 | ('Wells Fargo ATM','781 Broadway','New York','New York','NY',10003), 74 | ('JPMorgan Chase Bank, National Association','785 Broadway','New York','New York','NY',10003), 75 | ('Citibank N. A.','79 Fifth Avenue','New York','New York','NY',10003), 76 | ('TD Bank N.A.','80 University Place','New York','New York','NY',10003), 77 | ('JPMorgan Chase Bank, National Association','835 Broadway','New York','New York','NY',10003), 78 | ('Santander Bank','841 Broadway','New York','New York','NY',10003), 79 | ('Citibank N. A.','1 Broadway','New York','New York','NY',10004), 80 | ('Commerce Bank, N.A.','201 Eleventh Avenue','New York','New York','NY',10004), 81 | ('HSBC Bank USA, National Association','26 Broadway','New York','New York','NY',10004), 82 | ('JPMorgan Chase Bank, National Association','42 Broadway','New York','New York','NY',10004), 83 | ('Berkshire Bank, The','5 Broadway','New York','New York','NY',10004), 84 | ('Amalgamated Bank','52 Broadway','New York','New York','NY',10004), 85 | ('Wells Fargo ATM','75 Broad Street','New York','New York','NY',10004), 86 | ('Citibank N. A.','80 Broad Street','New York','New York','NY',10004), 87 | ('JPMorgan Chase Bank, National Association','1 Chase Manhattan Plaza','New York','New York','NY',10005), 88 | ('Apple Bank For Savings','10 Hanover Square','New York','New York','NY',10005), 89 | ('Citibank N. A.','111 Wall Street','New York','New York','NY',10005), 90 | ('TD Bank N.A.','2 Wall Street','New York','New York','NY',10005), 91 | ('JPMorgan Chase Bank, National Association','45 Wall Street','New York','New York','NY',10005), 92 | ('Bank of America N.A. GA1-006-15-40','95 Wall Street','New York','New York','NY',10005), 93 | ('Bank of America N.A. GA1-006-15-40','29 Broadway','New York','New York','NY',10006), 94 | ('Signature Bank','71 Broadway','New York','New York','NY',10006), 95 | ('JPMorgan Chase Bank, National Association','101 Barclay Street','New York','New York','NY',10007), 96 | ('Apple Bank For Savings','110 Church Street','New York','New York','NY',10007), 97 | ('JPMorgan Chase Bank, National Association','158 Greenwich St','New York','New York','NY',10007), 98 | ('TD Bank N.A.','166 Chambers Street','New York','New York','NY',10007), 99 | ('Bank of America N.A. GA1-006-15-40','168 Church Street','New York','New York','NY',10007), 100 | ('JPMorgan Chase Bank, National Association','185 Greenwich Street','New York','New York','NY',10007), 101 | ('Municipal Credit Union','2 Lafayette Street','New York','New York','NY',10007), 102 | ('First Republic Bank','225 Broadway','New York','New York','NY',10007), 103 | ('Citibank N. A.','250 Broadway','New York','New York','NY',10007), 104 | ('JPMorgan Chase Bank, National Association','253 Broadway','New York','New York','NY',10007), 105 | ('TD Bank N.A.','258 Broadway','New York','New York','NY',10007), 106 | ('Bank of America N.A. GA1-006-15-40','260 Greenwich Street','New York','New York','NY',10007), 107 | ('Bank of America N.A. GA1-006-15-40','261 Broadway','New York','New York','NY',10007), 108 | ('JPMorgan Chase Bank, National Association','270 Broadway','New York','New York','NY',10007), 109 | ('Capital One, N.A.','277 Broadway','New York','New York','NY',10007), 110 | ('Capital One, N.A.','90 West Broadway','New York','New York','NY',10007), 111 | ('Citibank N. A.','262 First Avenue','New York','New York','NY',10009), 112 | ('Capital One, N.A.','273 East 3rd Street','New York','New York','NY',10009), 113 | ('Citibank N. A.','36 Avenue C','New York','New York','NY',10009), 114 | ('Citibank N. A.','50 Avenue A','New York','New York','NY',10009), 115 | ('Santander Bank','57 East Avenue A','New York','New York','NY',10009), 116 | ('Key Bank, National Association','11 East 22nd Street','New York','New York','NY',10010), 117 | ('Citibank N. A.','1107 Broadway','New York','New York','NY',10010), 118 | ('Citibank N. A.','115 East 23rd Street','New York','New York','NY',10010), 119 | ('TD Bank N.A.','131 East 23rd Street','New York','New York','NY',10010), 120 | ('HSBC Bank USA, National Association','145 Fifth Avenue','New York','New York','NY',10010), 121 | ('JPMorgan Chase Bank, National Association','162 Fifth Avenue','New York','New York','NY',10010), 122 | ('JPMorgan Chase Bank, National Association','225 Fifth Avenue','New York','New York','NY',10010), 123 | ('Citibank N. A.','25 Waterside Plaza','New York','New York','NY',10010), 124 | ('TD Bank N.A.','260 Park Avenue South','New York','New York','NY',10010), 125 | ('JPMorgan Chase Bank, National Association','277 Park Avenue South','New York','New York','NY',10010), 126 | ('Amalgamated Bank','301 Third Avenue','New York','New York','NY',10010), 127 | ('HSBC Bank USA, National Association','302 Third Avenue','New York','New York','NY',10010), 128 | ('JPMorgan Chase Bank, National Association','333 East 23rd Street','New York','New York','NY',10010), 129 | ('Bank of America N.A. GA1-006-15-40','345 Park Avenue South','New York','New York','NY',10010), 130 | ('Banco Popular North America','375 Park Avenue South','New York','New York','NY',10010), 131 | ('Manufacturers and Traders Trust Company','397 First Avenue','New York','New York','NY',10010), 132 | ('Banco Popular North America','441 Second Avenue','New York','New York','NY',10010), 133 | ('TD Bank N.A.','655 Avenue of the Americas','New York','New York','NY',10010), 134 | ('Bank of America N.A. GA1-006-15-40','670 Avenue of the Americas','New York','New York','NY',10010), 135 | ('JPMorgan Chase Bank, National Association','71 West 23rd Street','New York','New York','NY',10010), 136 | ('Citibank N. A.','717 Avenue of Americas','New York','New York','NY',10010), 137 | ('Wells Fargo ATM','777 Avenue of the Americas','New York','New York','NY',10010), 138 | ('Valley National Bank','924 Broadway','New York','New York','NY',10010), 139 | ('TD Bank N.A.','950 Broadway','New York','New York','NY',10010), 140 | ('Citibank N. A.','111 Eighth Avenue','New York','New York','NY',10011), 141 | ('JPMorgan Chase Bank, National Association','111 Eighth Avenue','New York','New York','NY',10011), 142 | ('Wells Fargo ATM','112 Ninth Avenue','New York','New York','NY',10011), 143 | ('Bank of America N.A. GA1-006-15-40','116 Fifth Avenue','New York','New York','NY',10011), 144 | ('Wells Fargo ATM','120 Seventh Avenue','New York','New York','NY',10011), 145 | ('Capital One, N.A.','120 West 23rd Street','New York','New York','NY',10011), 146 | ('TD Bank N.A.','122 Greenwich Avenue ','New York','New York','NY',10011), 147 | ('Bank of America N.A. GA1-006-15-40','127 Eighth Avenue','New York','New York','NY',10011), 148 | ('People''s United Bank','127 Seventh Avenue','New York','New York','NY',10011), 149 | ('Capital One, N.A.','144 Eighth Avenue','New York','New York','NY',10011), 150 | ('JPMorgan Chase Bank, National Association','158 West 14th Street','New York','New York','NY',10011), 151 | ('Valley National Bank','159 Eighth Avenue','New York','New York','NY',10011), 152 | ('Santander Bank','169 Seventh Avenue','New York','New York','NY',10011), 153 | ('TD Bank N.A.','202 West 23rd Street','New York','New York','NY',10011), 154 | ('North East Community Bank','242 West 23rd Street','New York','New York','NY',10011), 155 | ('Bank of America N.A. GA1-006-15-40','244 Eighth Avenue','New York','New York','NY',10011), 156 | ('Apple Bank For Savings','250 West 23rd Street','New York','New York','NY',10011), 157 | ('Citibank N. A.','322 West 23rd Street','New York','New York','NY',10011), 158 | ('JPMorgan Chase Bank, National Association','340 Avenue of the Americas','New York','New York','NY',10011), 159 | ('HSBC Bank USA, National Association','354 Avenue of the Americas','New York','New York','NY',10011), 160 | ('Bank of America N.A. GA1-006-15-40','390 Sixth Avenue','New York','New York','NY',10011), 161 | ('Capital One, N.A.','401 West 23rd Street','New York','New York','NY',10011), 162 | ('First Republic Bank','442 Avenue of the Americas','New York','New York','NY',10011), 163 | ('Wells Fargo ATM','475 Sixth Avenue','New York','New York','NY',10011), 164 | ('JPMorgan Chase Bank, National Association','475 West 23rd Street','New York','New York','NY',10011), 165 | ('Capital One, N.A.','Chelsea Pier #59','New York','New York','NY',10011), 166 | ('Capital One, N.A.','Chelsea Pier #60','New York','New York','NY',10011), 167 | ('Capital One, N.A.','Chelsea Pier #61','New York','New York','NY',10011), 168 | ('JPMorgan Chase Bank, National Association','611 Avenue of the Americas','New York','New York','NY',10011), 169 | ('Capital One, N.A.','Chelsea Piers #62','New York','New York','NY',10011), 170 | ('HSBC Bank USA, National Association','80 Eighth Avenue','New York','New York','NY',10011), 171 | ('Capital One, N.A.','Chelsea Piers','New York','New York','NY',10011), 172 | ('Wells Fargo ATM','374 6th Avenue','New York','New York','NY',10011), 173 | ('Capital One, N.A.','154 Bleecker Street','New York','New York','NY',10012), 174 | ('Bank of America N.A. GA1-006-15-40','315 Lafayette Street','New York','New York','NY',10012), 175 | ('Apple Bank For Savings','371 Seventh Avenue','New York','New York','NY',10012), 176 | ('Capital One, N.A.','501 Broadway','New York','New York','NY',10012), 177 | ('JPMorgan Chase Bank, National Association','525 Broadway','New York','New York','NY',10012), 178 | ('HSBC Bank USA, National Association','550 BROADWAY','New York','New York','NY',10012), 179 | ('Citibank N. A.','555 LaGuardia Place','New York','New York','NY',10012), 180 | ('Bank of America N.A. GA1-006-15-40','589 Broadway','New York','New York','NY',10012), 181 | ('JPMorgan Chase Bank, National Association','623 Broadway','New York','New York','NY',10012), 182 | ('TD Bank N.A.','666 Broadway','New York','New York','NY',10012), 183 | ('HSBC Bank USA, National Association','110 West Broadway','New York','New York','NY',10013), 184 | ('Capital One, N.A.','116 Bowery','New York','New York','NY',10013), 185 | ('Citibank N. A.','120 West Broadway','New York','New York','NY',10013), 186 | ('Citibank N. A.','127 Hudson Street','New York','New York','NY',10013), 187 | ('Cathay Bank','129 Lafayette Street','New York','New York','NY',10013), 188 | ('TD Bank N.A.','155 Canal Street','New York','New York','NY',10013), 189 | ('Citibank N. A.','164 Canal Street','New York','New York','NY',10013), 190 | ('JPMorgan Chase Bank, National Association','180 Canal Street','New York','New York','NY',10013), 191 | ('Eastbank, NA','183 Centre Street','New York','New York','NY',10013), 192 | ('United Orient Bank','185 Canal Street','New York','New York','NY',10013), 193 | ('Citibank N. A.','2 Mott Street','New York','New York','NY',10013), 194 | ('Industrial and Commercial Bank of China (USA) NA','202 Canal Street','New York','New York','NY',10013), 195 | ('East West Bank','208 Canal Street','New York','New York','NY',10013), 196 | ('JPMorgan Chase Bank, National Association','221 Canal Street','New York','New York','NY',10013), 197 | ('JPMorgan Chase Bank, National Association','231 Grand Street','New York','New York','NY',10013), 198 | ('HSBC Bank USA, National Association','235 Canal Street','New York','New York','NY',10013), 199 | ('TD Bank N.A.','254 Canal Street','New York','New York','NY',10013), 200 | ('Bank of America N.A. GA1-006-15-40','277 Canal Street','New York','New York','NY',10013), 201 | ('Skyline Federal Credit Union','32 Avenue of the Americas','New York','New York','NY',10013), 202 | ('HSBC Bank USA, National Association','335 Broadway','New York','New York','NY',10013), 203 | ('Santander Bank','336 Broadway','New York','New York','NY',10013), 204 | ('Citibank N. A.','388 Greenwich Street','New York','New York','NY',10013), 205 | ('JPMorgan Chase Bank, National Association','407 Broadway','New York','New York','NY',10013), 206 | ('Valley National Bank','450 Broadway','New York','New York','NY',10013), 207 | ('Wells Fargo ATM','463 Broadway','New York','New York','NY',10013), 208 | ('Citibank N. A.','476 Broadway','New York','New York','NY',10013), 209 | ('Bank of America N.A. GA1-006-15-40','50 Bayard Street','New York','New York','NY',10013), 210 | ('HSBC Bank USA, National Association','58 Bowery','New York','New York','NY',10013), 211 | ('Abacus Federal Savings Bank','6-8 Bowery','New York','New York','NY',10013), 212 | ('JPMorgan Chase Bank, National Association','65 Worth Street','New York','New York','NY',10013), 213 | ('Bank of America N.A. GA1-006-15-40','88 Bowery Street','New York','New York','NY',10013), 214 | ('Apple Bank For Savings','10 Downing Street','New York','New York','NY',10014), 215 | ('TD Bank N.A.','175 Varick Street','New York','New York','NY',10014), 216 | ('Citibank N. A.','200 Varick Street','New York','New York','NY',10014), 217 | ('JPMorgan Chase Bank, National Association','204 West 4th Street','New York','New York','NY',10014), 218 | ('HSBC Bank USA, National Association','207 Varick Street','New York','New York','NY',10014), 219 | ('Bank of America N.A. GA1-006-15-40','224 West 4th Street','New York','New York','NY',10014), 220 | ('Banco Popular North America','285 Madison Avenue','New York','New York','NY',10014), 221 | ('JPMorgan Chase Bank, National Association','302 West 12th Street','New York','New York','NY',10014), 222 | ('JPMorgan Chase Bank, National Association','345 Hudson Street','New York','New York','NY',10014), 223 | ('Capital One, N.A.','347 Sixth Avenue','New York','New York','NY',10014), 224 | ('Capital One, N.A.','Pier 40 West Street','New York','New York','NY',10014), 225 | ('HSBC Bank USA, National Association','576 Hudson Street','New York','New York','NY',10014), 226 | ('Citibank N. A.','75 Christopher Street','New York','New York','NY',10014), 227 | ('Citibank N. A.','1 Park Avenue','New York','New York','NY',10016), 228 | ('Wells Fargo ATM','180 Madison Avenue','New York','New York','NY',10016), 229 | ('HSBC Bank USA, National Association','2 Park Avenue','New York','New York','NY',10016), 230 | ('JPMorgan Chase Bank, National Association','2 Park Avenue','New York','New York','NY',10016), 231 | ('First National Bank of Long Island','232 Madison Avenue','New York','New York','NY',10016), 232 | ('Santander Bank','250 Lexington Avenue','New York','New York','NY',10016), 233 | ('JPMorgan Chase Bank, National Association','260 Madison Avenue','New York','New York','NY',10016), 234 | ('Signature Bank','261 Madison Avenue','New York','New York','NY',10016), 235 | ('Investors Bank','267 Fifth Avenue','New York','New York','NY',10016), 236 | ('Valley National Bank','295 Fifth Avenue','New York','New York','NY',10016), 237 | ('KEB Hana Bank USA, NA','309 5TH AVENUE','New York','New York','NY',10016), 238 | ('Shinhan Bank America','313 Fifth Avenue','New York','New York','NY',10016), 239 | ('JPMorgan Chase Bank, National Association','349 Fifth Avenue','New York','New York','NY',10016), 240 | ('Bank of America N.A. GA1-006-15-40','353 Lexington Avenue','New York','New York','NY',10016), 241 | ('JPMorgan Chase Bank, National Association','386 Park Avenue South','New York','New York','NY',10016), 242 | ('Bank of America N.A. GA1-006-15-40','399 Third Avenue','New York','New York','NY',10016), 243 | ('Berkshire Bank, The','4 East 39th Street','New York','New York','NY',10016), 244 | ('TD Bank N.A.','401 Fifth Avenue','New York','New York','NY',10016), 245 | ('New York Community Bank','404 PARK AVENUE SOUTH','New York','New York','NY',10016), 246 | ('Citibank N. A.','411 Fifth Avenue','New York','New York','NY',10016), 247 | ('First Republic Bank','443 Park Avenue South','New York','New York','NY',10016), 248 | ('JPMorgan Chase Bank, National Association','450 Third Avenue','New York','New York','NY',10016), 249 | ('Capital One, N.A.','470 Park Avenue','New York','New York','NY',10016), 250 | ('Citibank N. A.','481 First Avenue','New York','New York','NY',10016), 251 | ('JPMorgan Chase Bank, National Association','501 Second Avenue','New York','New York','NY',10016), 252 | ('Bank of America N.A. GA1-006-15-40','560 Second Avenue','New York','New York','NY',10016), 253 | ('TD Bank N.A.','593 Third Avenue','New York','New York','NY',10016), 254 | ('Citibank N. A.','90 Park Avenue','New York','New York','NY',10016), 255 | ('Manufacturers and Traders Trust Company','95 Madison Avenue','New York','New York','NY',10016), 256 | ('Habib American Bank','99 Madison Avenue','New York','New York','NY',10016), 257 | ('Metropolitan National Bank','99 Park Avenue','New York','New York','NY',10016), 258 | ('JPMorgan Chase Bank, National Association','1 UN Plaza','New York','New York','NY',10017), 259 | ('Valley National Bank','100 Park Avenue','New York','New York','NY',10017), 260 | ('HSBC Bank USA, National Association','1002 Madison Avenue','New York','New York','NY',10017), 261 | ('Capital One, N.A.','109 East 42nd Street','New York','New York','NY',10017), 262 | ('Citibank N. A.','120 Park Avenue','New York','New York','NY',10017), 263 | ('TD Bank N.A.','125 Park Avenue','New York','New York','NY',10017), 264 | ('Citibank N. A.','145 East 42nd Street','New York','New York','NY',10017), 265 | ('JPMorgan Chase Bank, National Association','219 East 42nd Street','New York','New York','NY',10017), 266 | ('HSBC Bank USA, National Association','250 Park Avenue','New York','New York','NY',10017), 267 | ('Capital One, N.A.','300 Madison Avenue','New York','New York','NY',10017), 268 | ('Santander Bank','330 Madison Avenue','New York','New York','NY',10017), 269 | ('Citibank N. A.','330 Madison Avenue','New York','New York','NY',10017), 270 | ('Bank of America N.A. GA1-006-15-40','335 Madison Avenue','New York','New York','NY',10017), 271 | ('Emigrant Savings Bank - Manhattan','335 MADISON AVENUE','New York','New York','NY',10017), 272 | ('JPMorgan Chase Bank, National Association','355 Lexington Avenue','New York','New York','NY',10017), 273 | ('Citibank N. A.','400 Madison Avenue','New York','New York','NY',10017), 274 | ('JPMorgan Chase Bank, National Association','401 Madison Avenue','New York','New York','NY',10017), 275 | ('Capital One, N.A.','424 Madison Avenue','New York','New York','NY',10017), 276 | ('TD Bank N.A.','451 Lexington Avenue','New York','New York','NY',10017), 277 | ('Emigrant Savings Bank - Manhattan','5 EAST 42ND STREET','New York','New York','NY',10017), 278 | ('Bank of America N.A. GA1-006-15-40','501 Fifth Avenue','New York','New York','NY',10017), 279 | ('Bank of America N.A. GA1-006-15-40','56 East 42nd Street','New York','New York','NY',10017), 280 | ('JPMorgan Chase Bank, National Association','60 East 42nd Street','New York','New York','NY',10017), 281 | ('Sterling National Bank of New York','622 Third Avenue','New York','New York','NY',10017), 282 | ('JPMorgan Chase Bank, National Association','633 Third Avenue','New York','New York','NY',10017), 283 | ('Country Bank','655 Third Avenue','New York','New York','NY',10017), 284 | ('Wells Fargo ATM','666 Third Avenue','New York','New York','NY',10017), 285 | ('Bank of America N.A. GA1-006-15-40','675 Third Avenue','New York','New York','NY',10017), 286 | ('TD Bank N.A.','685 Third Avenue','New York','New York','NY',10017), 287 | ('Santander Bank','711 Third Avenue','New York','New York','NY',10017), 288 | ('Citibank N. A.','734 Third Avenue','New York','New York','NY',10017), 289 | ('Bank of America N.A. GA1-006-15-40','750 Third Avenue','New York','New York','NY',10017), 290 | ('HSBC Bank USA, National Association','777 Third Avenue','New York','New York','NY',10017), 291 | ('JPMorgan Chase Bank, National Association','801 Second Avenue','New York','New York','NY',10017), 292 | ('Citibank N. A.','866 United Nations Plaza','New York','New York','NY',10017), 293 | ('Country Bank','902 Second Avenue','New York','New York','NY',10017), 294 | ('TD Bank N.A.','919 Second Avenue','New York','New York','NY',10017), 295 | ('Capital One, N.A.','1001 Avenue of The Americas','New York','New York','NY',10018), 296 | ('Alma Bank','1023 Avenue of the Americas','New York','New York','NY',10018), 297 | ('Valley National Bank','1040 Sixth Avenue','New York','New York','NY',10018), 298 | ('Citibank N. A.','1065 Avenue of the Americas','New York','New York','NY',10018), 299 | ('HSBC Bank USA, National Association','1350 Broadway','New York','New York','NY',10018), 300 | ('Santander Bank','1350 Broadway','New York','New York','NY',10018), 301 | ('Metropolitan National Bank','1359 Broadway','New York','New York','NY',10018), 302 | ('Citibank N. A.','1384 Broadway','New York','New York','NY',10018), 303 | ('Capital One, N.A.','1407 Broadway','New York','New York','NY',10018), 304 | ('JPMorgan Chase Bank, National Association','1411 Broadway','New York','New York','NY',10018), 305 | ('HSBC Bank USA, National Association','452 Fifth Avenue','New York','New York','NY',10018), 306 | ('TD Bank N.A.','469 Seventh Avenue','New York','New York','NY',10018), 307 | ('JPMorgan Chase Bank, National Association','498 Fashion Avenue','New York','New York','NY',10018), 308 | ('Bank of America N.A. GA1-006-15-40','515 Seventh Avenue','New York','New York','NY',10018), 309 | ('HSBC Bank USA, National Association','518 Fashion Avenue','New York','New York','NY',10018), 310 | ('Wells Fargo ATM','535 Seventh Avenue','New York','New York','NY',10018), 311 | ('JPMorgan Chase Bank, National Association','615 Eighth Avenue','New York','New York','NY',10018), 312 | ('Bank of America N.A. GA1-006-15-40','625 8th Avenue','New York','New York','NY',10018), 313 | ('Capital One, N.A.','845 Third Avenue','New York','New York','NY',10018), 314 | ('First Republic Bank','10 Columbus Circle','New York','New York','NY',10019), 315 | ('Banco Popular North America','11 West 51st Street','New York','New York','NY',10019), 316 | ('Santander Bank','1290 Avenue of the Americas','New York','New York','NY',10019), 317 | ('Apple Bank For Savings','1320 Avenue of the Americas','New York','New York','NY',10019), 318 | ('JPMorgan Chase Bank, National Association','1370 Avenue of the Americas','New York','New York','NY',10019), 319 | ('TD Bank N.A.','1633 Broadway','New York','New York','NY',10019), 320 | ('TD Bank N.A.','1633 Broadway','New York','New York','NY',10019), 321 | ('Bank of America N.A. GA1-006-15-40','1680 Broadway','New York','New York','NY',10019), 322 | ('JPMorgan Chase Bank, National Association','171 West 57th Street','New York','New York','NY',10019), 323 | ('Capital One, N.A.','1745 Broadway','New York','New York','NY',10019), 324 | ('Citibank N. A.','1748 Broadway','New York','New York','NY',10019), 325 | ('Wells Fargo ATM','1755 Broadway','New York','New York','NY',10019), 326 | ('JPMorgan Chase Bank, National Association','1775 Broadway','New York','New York','NY',10019), 327 | ('Bank of America N.A. GA1-006-15-40','1775 Broadway','New York','New York','NY',10019), 328 | ('TD Bank N.A.','224 West 57th Street','New York','New York','NY',10019), 329 | ('Bank of America N.A. GA1-006-15-40','25 West 51st Street','New York','New York','NY',10019), 330 | ('Santander Bank','260 West 52nd Street/864 Eighth Avenue','New York','New York','NY',10019), 331 | ('Citibank N. A.','4 Columbus Circle','New York','New York','NY',10019), 332 | ('Commerce Bank, N.A.','428 West 59th Street','New York','New York','NY',10019), 333 | ('JPMorgan Chase Bank, National Association','51 West 51st Street','New York','New York','NY',10019), 334 | ('TD Bank N.A.','51 West 52nd Street','New York','New York','NY',10019), 335 | ('TD Bank N.A.','524 West 57th Street','New York','New York','NY',10019), 336 | ('Capital One, N.A.','57 West 57th Street','New York','New York','NY',10019), 337 | ('Citibank N. A.','640 Fifth Avenue','New York','New York','NY',10019), 338 | ('Citibank N. A.','787 Seventh Avenue','New York','New York','NY',10019), 339 | ('JPMorgan Chase Bank, National Association','810 Seventh Avenue','New York','New York','NY',10019), 340 | ('Manufacturers and Traders Trust Company','830 Eighth Avenue','New York','New York','NY',10019), 341 | ('Bank of America N.A. GA1-006-15-40','835 Eighth Avenue','New York','New York','NY',10019), 342 | ('JPMorgan Chase Bank, National Association','839 Ninth Avenue','New York','New York','NY',10019), 343 | ('Capital One, N.A.','840 Ninth Avenue','New York','New York','NY',10019), 344 | ('Citibank N. A.','842 Ninth Avenue','New York','New York','NY',10019), 345 | ('TD Bank N.A.','910 Eighth Avenue','New York','New York','NY',10019), 346 | ('Citibank N. A.','1 Rockefeller Plaza','New York','New York','NY',10020), 347 | ('First Republic Bank','1230 Avenue of the Americas','New York','New York','NY',10020), 348 | ('JPMorgan Chase Bank, National Association','1251 Avenue of the Americas','New York','New York','NY',10020), 349 | ('JPMorgan Chase Bank, National Association','1003 Lexington Avenue','New York','New York','NY',10021), 350 | ('Santander Bank','1062 3rd Avenue','New York','New York','NY',10021), 351 | ('Bank of America N.A. GA1-006-15-40','1066 Lexington Avenue','New York','New York','NY',10021), 352 | ('Citibank N. A.','1078 Third Avenue','New York','New York','NY',10021), 353 | ('TD Bank N.A.','1091 Third Avenue','New York','New York','NY',10021), 354 | ('Bank of America N.A. GA1-006-15-40','1143 Lexington Avenue','New York','New York','NY',10021), 355 | ('HSBC Bank USA, National Association','1165 Third Avenue','New York','New York','NY',10021), 356 | ('Apple Bank For Savings','1168 First Avenue','New York','New York','NY',10021), 357 | ('Capital One, N.A.','1180 Third Avenue','New York','New York','NY',10021), 358 | ('TD Bank N.A.','1230 Third Avenue','New York','New York','NY',10021), 359 | ('Citibank N. A.','1266 First Avenue','New York','New York','NY',10021), 360 | ('Citibank N. A.','1285 First Avenue','New York','New York','NY',10021), 361 | ('JPMorgan Chase Bank, National Association','1324 York Avenue','New York','New York','NY',10021), 362 | ('Valley National Bank','1328 Second Avenue','New York','New York','NY',10021), 363 | ('Citibank N. A.','1330 First Avenue','New York','New York','NY',10021), 364 | ('Bank of America N.A. GA1-006-15-40','1330 First Avenue','New York','New York','NY',10021), 365 | ('HSBC Bank USA, National Association','1340 Third Avenue','New York','New York','NY',10021), 366 | ('North East Community Bank','1355 1ST AVE','New York','New York','NY',10021), 367 | ('Wells Fargo ATM','1370 Third Avenue','New York','New York','NY',10021), 368 | ('Ridgewood Savings Bank','1404 Second Avenue','New York','New York','NY',10021), 369 | ('TD Bank N.A.','1470 Second Avenue','New York','New York','NY',10021), 370 | ('Citibank N. A.','1510-12 First Avenue','New York','New York','NY',10021), 371 | ('Citibank N. A.','171 East 72nd Street','New York','New York','NY',10021), 372 | ('JPMorgan Chase Bank, National Association','35 East 72nd Street','New York','New York','NY',10021), 373 | ('JPMorgan Chase Bank, National Association','360 East 72nd Street','New York','New York','NY',10021), 374 | ('Citibank N. A.','757 Madison Avenue','New York','New York','NY',10021), 375 | ('Commerce Bank, N.A.','830 Fifth Avenue','New York','New York','NY',10021), 376 | ('TD Bank N.A.','1031 First Avenue','New York','New York','NY',10022), 377 | ('Manufacturers and Traders Trust Company','1034 Second Avenue','New York','New York','NY',10022), 378 | ('Citibank N. A.','1044 First Avenue','New York','New York','NY',10022), 379 | ('HSBC Bank USA, National Association','131 East 57th Street','New York','New York','NY',10022), 380 | ('BankUnited, NA','136 East 57th Street','New York','New York','NY',10022), 381 | ('Capital One, N.A.','300 East 55th Street','New York','New York','NY',10022), 382 | ('Capital One, N.A.','320 Park Avenue','New York','New York','NY',10022), 383 | ('First Republic Bank','320 Park Avenue','New York','New York','NY',10022), 384 | ('Citibank N. A.','333 Park Avenue South','New York','New York','NY',10022), 385 | ('Valley National Bank','350 Park Avenue','New York','New York','NY',10022), 386 | ('JPMorgan Chase Bank, National Association','360 East 57th Street','New York','New York','NY',10022), 387 | ('JPMorgan Chase Bank, National Association','360 Park Avenue','New York','New York','NY',10022), 388 | ('Citibank N. A.','399 Park Avenue','New York','New York','NY',10022), 389 | ('City National Bank','400 PARK AVENUE','New York','New York','NY',10022), 390 | ('Capital One, N.A.','404 Fifth Avenue','New York','New York','NY',10022), 391 | ('New York Community Bank','405 PARK AVENUE','New York','New York','NY',10022), 392 | ('JPMorgan Chase Bank, National Association','410 Park Avenue','New York','New York','NY',10022), 393 | ('Wells Fargo ATM','437 Madison Avenue','New York','New York','NY',10022), 394 | ('TD Bank N.A.','444 Madison Avenue','New York','New York','NY',10022), 395 | ('Santander Bank','45 East 53rd Street','New York','New York','NY',10022), 396 | ('Citibank N. A.','460 Park Avenue','New York','New York','NY',10022), 397 | ('TD Bank N.A.','475 Park Avenue South','New York','New York','NY',10022), 398 | ('M.Y. Safra Bank, FSB','499 Park Avenue','New York','New York','NY',10022), 399 | ('TD Bank N.A.','500 Park Ave','New York','New York','NY',10022), 400 | ('Capital One, N.A.','502 Park Avenue','New York','New York','NY',10022), 401 | ('JPMorgan Chase Bank, National Association','510 Park Avenue','New York','New York','NY',10022), 402 | ('East West Bank','535 Madison Avenue','New York','New York','NY',10022), 403 | ('Wells Fargo ATM','540 Madison Avenue','New York','New York','NY',10022), 404 | ('Entertainment Industries Federal Credit Union','550 Madison Avenue','New York','New York','NY',10022), 405 | ('TD Bank N.A.','555 Madison Avenue','New York','New York','NY',10022), 406 | ('First Republic Bank','575 Madison Avenue','New York','New York','NY',10022), 407 | ('JPMorgan Chase Bank, National Association','610 Madison Avenue','New York','New York','NY',10022), 408 | ('Capital One, N.A.','643 Lexington Avenue','New York','New York','NY',10022), 409 | ('Wells Fargo ATM','731 Lexington Avenue','New York','New York','NY',10022), 410 | ('Citibank N. A.','785 Fifth Avenue','New York','New York','NY',10022), 411 | ('Citibank N. A.','800 Third Avenue','New York','New York','NY',10022), 412 | ('Apple Bank For Savings','812-814 Lexington Avenue','New York','New York','NY',10022), 413 | ('JPMorgan Chase Bank, National Association','850 Third Avenue','New York','New York','NY',10022), 414 | ('Wells Fargo ATM','866 Third Avenue','New York','New York','NY',10022), 415 | ('Banco Popular North America','875 Third Avenue','New York','New York','NY',10022), 416 | ('TD Bank N.A.','880 Third Avenue','New York','New York','NY',10022), 417 | ('Bank of America N.A. GA1-006-15-40','882 First Avenue','New York','New York','NY',10022), 418 | ('JPMorgan Chase Bank, National Association','900 First Avenue','New York','New York','NY',10022), 419 | ('Bank of America N.A. GA1-006-15-40','900 Third Avenue','New York','New York','NY',10022), 420 | ('Commerce Bank, N.A.','909 Third Avenue','New York','New York','NY',10022), 421 | ('JPMorgan Chase Bank, National Association','919 Third Avenue','New York','New York','NY',10022), 422 | ('New York Community Bank','936 THIRD AVENUE','New York','New York','NY',10022), 423 | ('TD Bank N.A.','953 Third Avenue','New York','New York','NY',10022), 424 | ('Citibank N. A.','974 Third Avenue','New York','New York','NY',10022), 425 | ('Bank of America N.A. GA1-006-15-40','988 Third Avenue','New York','New York','NY',10022), 426 | ('Capital One, N.A.','991 Third Avenue','New York','New York','NY',10022), 427 | ('JPMorgan Chase Bank, National Association','993 Second Avenue','New York','New York','NY',10022), 428 | ('JPMorgan Chase Bank, National Association','994 First Avenue','New York','New York','NY',10022), 429 | ('Commerce Bank, N.A.','113 West 60th Street','New York','New York','NY',10023), 430 | ('Capital One, N.A.','1295 Second Avenue','New York','New York','NY',10023), 431 | ('JPMorgan Chase Bank, National Association','160 Columbus Avenue','New York','New York','NY',10023), 432 | ('Citibank N. A.','162 Amsterdam Avenue','New York','New York','NY',10023), 433 | ('Citibank N. A.','170 West 72nd Street','New York','New York','NY',10023), 434 | ('Capital One, N.A.','175 West 72nd Street','New York','New York','NY',10023), 435 | ('JPMorgan Chase Bank, National Association','1860 Broadway','New York','New York','NY',10023), 436 | ('TD Bank N.A.','1873 Broadway','New York','New York','NY',10023), 437 | ('Bank of America N.A. GA1-006-15-40','1886 Broadway','New York','New York','NY',10023), 438 | ('Citibank N. A.','1900 Broadway','New York','New York','NY',10023), 439 | ('Bank of America N.A. GA1-006-15-40','192 Columbus Avenue','New York','New York','NY',10023), 440 | ('TD Bank N.A.','1995 Broadway','New York','New York','NY',10023), 441 | ('Capital One, N.A.','2025 Broadway','New York','New York','NY',10023), 442 | ('HSBC Bank USA, National Association','2025 Broadway','New York','New York','NY',10023), 443 | ('JPMorgan Chase Bank, National Association','2030 Broadway','New York','New York','NY',10023), 444 | ('Bank of America N.A. GA1-006-15-40','2077 Broadway','New York','New York','NY',10023), 445 | ('JPMorgan Chase Bank, National Association','2099 Broadway','New York','New York','NY',10023), 446 | ('Apple Bank For Savings','2100 Broadway','New York','New York','NY',10023), 447 | ('TD Bank N.A.','2109 Broadway','New York','New York','NY',10023), 448 | ('JPMorgan Chase Bank, National Association','260 Columbus Avenue','New York','New York','NY',10023), 449 | ('American Broadcast Employees Federal Credit Union','30 West 66th Street','New York','New York','NY',10023), 450 | ('HSBC Bank USA, National Association','301 Columbus Avenue','New York','New York','NY',10023), 451 | ('Bank of America N.A. GA1-006-15-40','334 Columbus Avenue','New York','New York','NY',10023), 452 | ('JPMorgan Chase Bank, National Association','335 Columbus Avenue','New York','New York','NY',10023), 453 | ('American Broadcast Employees Federal Credit Union','77 West 66th Street','New York','New York','NY',10023), 454 | ('Wells Fargo ATM','2039 BROADWAY','New York','New York','NY',10024), 455 | ('First Republic Bank','2160 Broadway','New York','New York','NY',10024), 456 | ('JPMorgan Chase Bank, National Association','2219 Broadway','New York','New York','NY',10024), 457 | ('Bank of America N.A. GA1-006-15-40','2260 Broadway','New York','New York','NY',10024), 458 | ('Santander Bank','2275 Broadway','New York','New York','NY',10024), 459 | ('Citibank N. A.','2350 Broadway','New York','New York','NY',10024), 460 | ('Capital One, N.A.','2379 Broadway','New York','New York','NY',10024), 461 | ('Bank of America N.A. GA1-006-15-40','2380 Broadway','New York','New York','NY',10024), 462 | ('TD Bank N.A.','2400 Broadway','New York','New York','NY',10024), 463 | ('HSBC Bank USA, National Association','2411 Broadway','New York','New York','NY',10024), 464 | ('Wells Fargo ATM','2415 BROADWAY','New York','New York','NY',10024), 465 | ('JPMorgan Chase Bank, National Association','2438 Broadway','New York','New York','NY',10024), 466 | ('Citibank N. A.','441 Columbus Avenue','New York','New York','NY',10024), 467 | ('TD Bank N.A.','535 Columbus Avenue','New York','New York','NY',10024), 468 | ('JPMorgan Chase Bank, National Association','59 West 86th Street','New York','New York','NY',10024), 469 | ('Commerce Bank, N.A.','1111 Amsterdam Avenue','New York','New York','NY',10025), 470 | ('Capital One, N.A.','2519 Broadway','New York','New York','NY',10025), 471 | ('TD Bank N.A.','2521 Broadway','New York','New York','NY',10025), 472 | ('JPMorgan Chase Bank, National Association','2540 BROADWAY','New York','New York','NY',10025), 473 | ('JPMorgan Chase Bank, National Association','2540 Broadway','New York','New York','NY',10025), 474 | ('Citibank N. A.','2560 Broadway','New York','New York','NY',10025), 475 | ('Bank of America N.A. GA1-006-15-40','2574 Broadway','New York','New York','NY',10025), 476 | ('Bank of America N.A. GA1-006-15-40','2770 Broadway','New York','New York','NY',10025), 477 | ('Banco Popular North America','2812 Broadway','New York','New York','NY',10025), 478 | ('Santander Bank','2814 Broadway','New York','New York','NY',10025), 479 | ('JPMorgan Chase Bank, National Association','2824 Broadway','New York','New York','NY',10025), 480 | ('TD Bank N.A.','2831 Broadway','New York','New York','NY',10025), 481 | ('Citibank N. A.','2872 Broadway','New York','New York','NY',10025), 482 | ('JPMorgan Chase Bank, National Association','2898 Broadway','New York','New York','NY',10025), 483 | ('HSBC Bank USA, National Association','721 Amsterdam Avenue','New York','New York','NY',10025), 484 | ('Capital One, N.A.','750 Columbus Avenue','New York','New York','NY',10025), 485 | ('JPMorgan Chase Bank, National Association','775 Columbus Avenue','New York','New York','NY',10025), 486 | ('Bank of America N.A. GA1-006-15-40','808 Columbus Avenue','New York','New York','NY',10025), 487 | ('Banco Popular North America','90 West 96th Street','New York','New York','NY',10025), 488 | ('Bank of America N.A. GA1-006-15-40','106 West 117th Street','New York','New York','NY',10026), 489 | ('Carver Federal Savings Bank','142 Malcolm X Boulevard','New York','New York','NY',10026), 490 | ('Wells Fargo ATM','143 Lenox Avenue','New York','New York','NY',10026), 491 | ('Spring Bank','2049 Frederick Douglass Boulevard','New York','New York','NY',10026), 492 | ('HSBC Bank USA, National Association','2063 Fredrick Douglas Boulevard','New York','New York','NY',10026), 493 | ('JPMorgan Chase Bank, National Association','2195 Frederick Douglas Boulevard','New York','New York','NY',10026), 494 | ('JPMorgan Chase Bank, National Association','2195 FREDERICK DOUGLASS BLVD','New York','New York','NY',10026), 495 | ('TD Bank N.A.','100 West 125th Street ','New York','New York','NY',10027), 496 | ('Citibank N. A.','1310 Amsterdam Avenue','New York','New York','NY',10027), 497 | ('Citibank N. A.','201 West 125th Street','New York','New York','NY',10027), 498 | ('Bank of America N.A. GA1-006-15-40','215 West 125th Street','New York','New York','NY',10027), 499 | ('Banco Popular North America','231 West 125th Street','New York','New York','NY',10027), 500 | ('Capital One, N.A.','2310 Frederick Douglas Boulevard','New York','New York','NY',10027), 501 | ('Municipal Credit Union','280 St. Nicholas Avenue','New York','New York','NY',10027), 502 | ('TD Bank N.A.','300 West 125th Street','New York','New York','NY',10027), 503 | ('Capital One, N.A.','301 West 125th Street','New York','New York','NY',10027), 504 | ('Manufacturers and Traders Trust Company','310 Lenox Avenue','New York','New York','NY',10027), 505 | ('JPMorgan Chase Bank, National Association','3200 Broadway','New York','New York','NY',10027), 506 | ('JPMorgan Chase Bank, National Association','322 West 125th Street','New York','New York','NY',10027), 507 | ('JPMorgan Chase Bank, National Association','350 West 125th Street','New York','New York','NY',10027), 508 | ('Citibank N. A.','545 West 114th Street','New York','New York','NY',10027), 509 | ('JPMorgan Chase Bank, National Association','55 West 125th Street','New York','New York','NY',10027), 510 | ('Carver Federal Savings Bank','75 West 125th Street','New York','New York','NY',10027), 511 | ('TD Bank N.A.','1133 Madison Avenue','New York','New York','NY',10028), 512 | ('Apple Bank For Savings','1170 Lexington Avenue','New York','New York','NY',10028), 513 | ('JPMorgan Chase Bank, National Association','12 East 86th Street','New York','New York','NY',10028), 514 | ('Citibank N. A.','123 East 86th Street','New York','New York','NY',10028), 515 | ('JPMorgan Chase Bank, National Association','126 East 86th Street','New York','New York','NY',10028), 516 | ('Bank of America N.A. GA1-006-15-40','1275 Lexington Avenue','New York','New York','NY',10028), 517 | ('Citibank N. A.','1275 Madison Avenue','New York','New York','NY',10028), 518 | ('TD Bank N.A.','1276 Lexington Avenue','New York','New York','NY',10028), 519 | ('Citibank N. A.','1445 East 82nd Street','New York','New York','NY',10028), 520 | ('TD Bank N.A.','1504 Third Avenue','New York','New York','NY',10028), 521 | ('Capital One, N.A.','1536 Third Avenue','New York','New York','NY',10028), 522 | ('Apple Bank For Savings','1555 First Avenue','New York','New York','NY',10028), 523 | ('Ridgewood Savings Bank','1646 First Avenue','New York','New York','NY',10028), 524 | ('HSBC Bank USA, National Association','186 East 86th Street','New York','New York','NY',10028), 525 | ('Santander Bank','225 East 86th Street','New York','New York','NY',10028), 526 | ('JPMorgan Chase Bank, National Association','244 East 86th Street','New York','New York','NY',10028), 527 | ('Wells Fargo ATM','247 E 86th Street','New York','New York','NY',10028), 528 | ('Capital One, N.A.','249 East 86th Street','New York','New York','NY',10028), 529 | ('JPMorgan Chase Bank, National Association','453 East 86th Street','New York','New York','NY',10028), 530 | ('Sterling National Bank of New York','1249 Fifth Avenue','New York','New York','NY',10029), 531 | ('Banco Popular North America','164 East 116th Street','New York','New York','NY',10029), 532 | ('JPMorgan Chase Bank, National Association','179 East 116th Street','New York','New York','NY',10029), 533 | ('JPMorgan Chase Bank, National Association','1924 Third Avenue','New York','New York','NY',10029), 534 | ('Ponce De Leon Federal Bank','1925 Third Avenue','New York','New York','NY',10029), 535 | ('JPMorgan Chase Bank, National Association','2065 Second Avenue','New York','New York','NY',10029), 536 | ('New York National Bank','2256 Second Avenue','New York','New York','NY',10029), 537 | ('Citibank N. A.','2481 Adam Clayton Boulevard','New York','New York','NY',10030), 538 | ('Municipal Credit Union','2518 Frederick Douglas Boulevard','New York','New York','NY',10030), 539 | ('JPMorgan Chase Bank, National Association','300 West 135th Street','New York','New York','NY',10030), 540 | ('JPMorgan Chase Bank, National Association','3359 Broadway','New York','New York','NY',10031), 541 | ('JPMorgan Chase Bank, National Association','3515 Broadway','New York','New York','NY',10031), 542 | ('Banco Popular North America','3540 Broadway','New York','New York','NY',10031), 543 | ('Municipal Credit Union','3621 Broadway @ 149th Street','New York','New York','NY',10031), 544 | ('Capital One, N.A.','700 Saint Nicholas Avenue','New York','New York','NY',10031), 545 | ('Banco Popular North America','1200 St. Nicholas Avenue','New York','New York','NY',10032), 546 | ('TD Bank N.A.','3798 Broadway','New York','New York','NY',10032), 547 | ('Apple Bank For Savings','3815 Broadway','New York','New York','NY',10032), 548 | ('JPMorgan Chase Bank, National Association','3940 Broadway','New York','New York','NY',10032), 549 | ('Citibank N. A.','4058 Broadway','New York','New York','NY',10032), 550 | ('Bank of America N.A. GA1-006-15-40','4061 Broadway','New York','New York','NY',10032), 551 | ('Berkshire Bank, The','210 Pinehurst Avenue','New York','New York','NY',10033), 552 | ('New York National Bank','4211 Broadway','New York','New York','NY',10033), 553 | ('New York Community Bank','4246 BROADWAY','New York','New York','NY',10033), 554 | ('Citibank N. A.','4249 Broadway','New York','New York','NY',10033), 555 | ('JPMorgan Chase Bank, National Association','596 Fort Washington Avenue','New York','New York','NY',10033), 556 | ('Banco Popular North America','615 West 181 Street','New York','New York','NY',10033), 557 | ('Capital One, N.A.','620 West 181st Street','New York','New York','NY',10033), 558 | ('JPMorgan Chase Bank, National Association','659 W 181ST ST','New York','New York','NY',10033), 559 | ('JPMorgan Chase Bank, National Association','659 W 181ST ST','New York','New York','NY',10033), 560 | ('TD Bank N.A.', '4941 Broadway','New York','New York','NY',10034), 561 | ('Citibank N.A.','4949 Broadway','New York','New York','NY',10034), 562 | ('Apple Bank For Savings','4950 Broadway','New York','New York','NY',10034), 563 | ('JPMorgan Chase Bank, National Association','570 West 207th Street','New York','New York','NY',10034), 564 | ('JPMorgan Chase Bank, National Association','103 East 125th Street','New York','New York','NY',10035), 565 | ('Apple Bank For Savings','124 East 125th Street','New York','New York','NY',10035), 566 | ('Bank of America N.A. GA1-006-15-40','157 East 125th Street','New York','New York','NY',10035), 567 | ('Commerce Bank, N.A.','1879 Madison Avenue','New York','New York','NY',10035), 568 | ('TD Bank N.A.','2144 Third Avenue','New York','New York','NY',10035), 569 | ('Citibank N. A.','2261 First Avenue','New York','New York','NY',10035), 570 | ('Manufacturers and Traders Trust Company','11 West 42nd Street','New York','New York','NY',10036), 571 | ('JPMorgan Chase Bank, National Association','1120 Avenue of the Americas','New York','New York','NY',10036), 572 | ('TD Bank N.A.','1120 Avenue of the Americas','New York','New York','NY',10036), 573 | ('Bank of America N.A. GA1-006-15-40','115 West 42nd Street','New York','New York','NY',10036), 574 | ('Citibank N. A.','1155 Avenue of the Americas','New York','New York','NY',10036), 575 | ('Wells Fargo ATM','1156 Avenue of the Americas','New York','New York','NY',10036), 576 | ('Capital One, N.A.','1166 Avenue of the Americas','New York','New York','NY',10036), 577 | ('HSBC Bank USA, National Association','1185 Avenue of the Americas','New York','New York','NY',10036), 578 | ('Metropolitan National Bank','16 West 46th Street','New York','New York','NY',10036), 579 | ('JPMorgan Chase Bank, National Association','3 Times Square','New York','New York','NY',10036), 580 | ('Citibank N. A.','401 West 42nd Street','New York','New York','NY',10036), 581 | ('JPMorgan Chase Bank, National Association','471 West 42nd Street','New York','New York','NY',10036), 582 | ('JPMorgan Chase Bank, National Association','530 Fifth Avenue','New York','New York','NY',10036), 583 | ('Bank of America N.A. GA1-006-15-40','550 Fifth Avenue','New York','New York ','NY',10036), 584 | ('TD Bank N.A.','582-586 Ninth Avenue','New York','New York','NY',10036), 585 | ('Valley National Bank','71 West 47th Street','New York','New York','NY',10036), 586 | ('JPMorgan Chase Bank, National Association','2218 Fifth Avenue','New York','New York','NY',10037), 587 | ('Citibank N. A.','100 William Street','New York','New York','NY',10038), 588 | ('Abacus Federal Savings Bank','104-116 Nassau Street','New York','New York','NY',10038), 589 | ('HSBC Bank USA, National Association','11 East Broadway','New York','New York','NY',10038), 590 | ('HSBC Bank USA, National Association','110 William Street','New York','New York','NY',10038), 591 | ('New York Community Bank','15 MAIDEN LANE','New York','New York','NY',10038), 592 | ('Bank of America N.A. GA1-006-15-40','150 Broadway','New York','New York','NY',10038), 593 | ('JPMorgan Chase Bank, National Association','155 Water Street','New York','New York','NY',10038), 594 | ('Capital One, N.A.','176 Broadway','New York','New York','NY',10038), 595 | ('TD Bank N.A.','182 Broadway','New York','New York','NY',10038), 596 | ('Santander Bank','2 Gold Street','New York','New York','NY',10038), 597 | ('JPMorgan Chase Bank, National Association','214 Broadway','New York','New York','NY',10038), 598 | ('TD Bank N.A.','40 Fulton Street','New York','New York','NY',10038), 599 | ('Global Bank','8 CATHERINE STREET','New York','New York','NY',10038), 600 | ('JPMorgan Chase Bank, National Association','8 CHATHAM SQUARE','New York','New York','NY',10038), 601 | ('JPMorgan Chase Bank, National Association','8 CHATHAM SQUARE','New York','New York','NY',10038), 602 | ('Carver Federal Savings Bank','300 West 145th Street','New York','New York','NY',10039), 603 | ('Bank of America N.A. GA1-006-15-40','301 West 145th Street','New York','New York','NY',10039), 604 | ('JPMorgan Chase Bank, National Association','330 West 145th Street','New York','New York','NY',10039), 605 | ('JPMorgan Chase Bank, National Association','161 Dyckman Street','New York','New York','NY',10040), 606 | ('Banco Popular North America','180 Dyckman Street','New York','New York','NY',10040), 607 | ('Capital One, N.A.','21 Dyckman Street','New York','New York','NY',10040), 608 | ('Bank of America N.A. GA1-006-15-40','210 Dyckman Street','New York','New York ','NY',10040), 609 | ('JPMorgan Chase Bank, National Association','55 Water Street','New York','New York','NY',10041), 610 | ('City National Bank','1140 Sixth Avenue','New York','New York','NY',10063), 611 | ('JPMorgan Chase Bank, National Association','1100 Third Avenue','New York','New York','NY',10065), 612 | ('Bank of America N.A. GA1-006-15-40','1107 Third Avenue','New York','New York','NY',10065), 613 | ('JPMorgan Chase Bank, National Association','1180 Second Avenue','New York','New York','NY',10065), 614 | ('TD Bank N.A.','1240 First Avenue','New York','New York','NY',10065), 615 | ('JPMorgan Chase Bank, National Association','726 Madison Avenue','New York','New York','NY',10065), 616 | ('JPMorgan Chase Bank, National Association','770 Lexington Avenue','New York','New York','NY',10065), 617 | ('JPMorgan Chase Bank, National Association','941 Lexington Avenue','New York','New York','NY',10065), 618 | ('Teachers Federal Credit Union','180 Riverside Blvd','New York','New York','NY',10069), 619 | ('JPMorgan Chase Bank, National Association','1025 Madison Avenue','New York','New York','NY',10075), 620 | ('Citibank N. A.','1042 Madison Avenue','New York','New York','NY',10075), 621 | ('First Republic Bank','148 East 79th Street','New York','New York','NY',10075), 622 | ('JPMorgan Chase Bank, National Association','1495 York Avenue','New York','New York','NY',10075), 623 | ('Capital One, N.A.','1510 Second Avenue','New York','New York','NY',10075), 624 | ('JPMorgan Chase Bank, National Association','201 East 79th Street','New York','New York','NY',10075), 625 | ('Citibank N. A.','666 Fifth Avenue','New York','New York','NY',10103), 626 | ('HSBC Bank USA, National Association','666 Fifth Avenue','New York','New York','NY',10103), 627 | ('Citibank N. A.','1345 Avenue of the Americas','New York','New York','NY',10105), 628 | ('HSBC Bank USA, National Association','252 West 57th Street','New York','New York','NY',10107), 629 | ('Bank of America N.A. GA1-006-15-40','One Penn Plaza East','New York','New York','NY',10119), 630 | ('JPMorgan Chase Bank, National Association','2 Penn Plaza','New York','New York','NY',10121), 631 | ('JPMorgan Chase Bank, National Association','2 PENN PLZ','New York','New York','NY',10121), 632 | ('JPMorgan Chase Bank, National Association','2 PENN PLZ','New York','New York','NY',10121), 633 | ('JPMorgan Chase Bank, National Association','1221 Madison Avenue','New York','New York','NY',10128), 634 | ('Citibank N. A.','1391 Madison Avenue','New York','New York','NY',10128), 635 | ('Valley National Bank','1569 Third Avenue','New York','New York','NY',10128), 636 | ('TD Bank N.A.','1709 Third Avenue','New York','New York','NY',10128), 637 | ('Citibank N. A.','1781 First Avenue','New York','New York','NY',10128), 638 | ('JPMorgan Chase Bank, National Association','1801 Second Avenue','New York','New York','NY',10128), 639 | ('JPMorgan Chase Bank, National Association','181 East 90th Street','New York','New York','NY',10128), 640 | ('Citibank N. A.','340 East 93rd Street','New York','New York','NY',10128), 641 | ('HSBC Bank USA, National Association','45 East 89th Street','New York','New York','NY',10128), 642 | ('Bank of America N.A. GA1-006-15-40','345 Park Avenue','New York','New York','NY',10154), 643 | ('HSBC Bank USA, National Association','617 Third Avenue','New York','New York','NY',10158), 644 | ('Citibank N. A.','200 Park Avenue','New York','New York','NY',10166), 645 | ('Bank of America N.A. GA1-006-15-40','200 Park Avenue','New York','New York','NY',10166), 646 | ('Apple Bank For Savings','122 EAST 42ND STREET','New York','New York','NY',10168), 647 | ('JPMorgan Chase Bank, National Association','405 Lexington Avenue','New York','New York','NY',10174), 648 | ('Bank of America N.A. GA1-006-15-40','425 Lexington Avenue','New York','New York','NY',10174), 649 | ('HSBC Bank USA, National Association','101 Park Avenue','New York','New York','NY',10178), 650 | ('HSBC Bank USA, National Association','117 Broadway','New York','New York','NY',10271), 651 | ('Valley National Bank','120 Broadway','New York','New York','NY',10271), 652 | ('Citibank N. A.','120 Broadway','New York','New York','NY',10271), 653 | ('JPMorgan Chase Bank, National Association','331-337 South End Avenue','New York','New York','NY',10280), 654 | ('USAlliance Financial','200 Vesey Street','New York','New York','NY',10281), 655 | ('TD Bank N.A.','90 Fifth Avenue','New York','New York','NY',11011); 656 | -------------------------------------------------------------------------------- /Chapter03/Figure3-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-1.png -------------------------------------------------------------------------------- /Chapter03/Figure3-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-10.png -------------------------------------------------------------------------------- /Chapter03/Figure3-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-11.png -------------------------------------------------------------------------------- /Chapter03/Figure3-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-12.png -------------------------------------------------------------------------------- /Chapter03/Figure3-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-13.png -------------------------------------------------------------------------------- /Chapter03/Figure3-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-14.png -------------------------------------------------------------------------------- /Chapter03/Figure3-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-15.png -------------------------------------------------------------------------------- /Chapter03/Figure3-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-16.png -------------------------------------------------------------------------------- /Chapter03/Figure3-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-17.png -------------------------------------------------------------------------------- /Chapter03/Figure3-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-18.png -------------------------------------------------------------------------------- /Chapter03/Figure3-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-19.png -------------------------------------------------------------------------------- /Chapter03/Figure3-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-2.png -------------------------------------------------------------------------------- /Chapter03/Figure3-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-20.png -------------------------------------------------------------------------------- /Chapter03/Figure3-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-21.png -------------------------------------------------------------------------------- /Chapter03/Figure3-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-3.png -------------------------------------------------------------------------------- /Chapter03/Figure3-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-4.png -------------------------------------------------------------------------------- /Chapter03/Figure3-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-5.png -------------------------------------------------------------------------------- /Chapter03/Figure3-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-6.png -------------------------------------------------------------------------------- /Chapter03/Figure3-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-7.png -------------------------------------------------------------------------------- /Chapter03/Figure3-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-8.png -------------------------------------------------------------------------------- /Chapter03/Figure3-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter03/Figure3-9.png -------------------------------------------------------------------------------- /Chapter03/NodeJS_Angular_Script.sh: -------------------------------------------------------------------------------- 1 | 2 | [centos@ip-172-31-95-213 ~]$ sudo su 3 | [root@ip-172-31-95-213 centos]# cd /usr/local/src/ 4 | 5 | # Install NodeJS 6 | [root@ip-172-31-95-213 src]# yum install wget 7 | Please enter 'y' for yes when asked 8 | [root@ip-172-31-95-213 src]# yum install -y gcc-c++ make 9 | 10 | [root@ip-172-31-95-213 src]# curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash 11 | 12 | [root@ip-172-31-95-213 src]# yum install nodejs 13 | Please enter 'y' for yes when asked 14 | 15 | [root@ip-172-31-95-213 src]# node -v 16 | v10.15.3 17 | [root@ip-172-31-95-213 src]# npm -v 18 | 6.4.1 19 | 20 | # Create API project folder 21 | [root@ip-172-31-95-213 src]# mkdir node-api-postgres 22 | [root@ip-172-31-95-213 src]# cd node-api-postgres 23 | [root@ip-172-31-95-213 node-api-postgres]# 24 | 25 | # Install Express 26 | [root@ip-172-31-95-213 node-api-postgres]# npm install express-generator -g 27 | [root@ip-172-31-95-213 node-api-postgres]# npm install express -g 28 | [root@ip-172-31-95-213 node-api-postgres]# express node-api 29 | 30 | [root@ip-172-31-95-213 node-api-postgres]# cd node-api 31 | [root@ip-172-31-95-213 node-api]# npm install 32 | 33 | # Install pg-promise and bluebird 34 | [root@ip-172-31-95-213 node-api]# npm install pg-promise -g 35 | [root@ip-172-31-95-213 node-api]# npm install bluebird -g 36 | 37 | [root@ip-172-31-95-213 node-api]# npm install serve-favicon 38 | 39 | [root@ip-172-31-95-213 node-api]# npm install --save bluebird 40 | [root@ip-172-31-95-213 node-api]# npm install --save pg-promise 41 | 42 | # Install Angular 43 | [root@ip-172-31-95-213 node-api]# npm install -g @angular/cli 44 | -------------------------------------------------------------------------------- /Chapter03/node-api/app.js: -------------------------------------------------------------------------------- 1 | var createError = require('http-errors'); 2 | var express = require('express'); 3 | var path = require('path'); 4 | var cookieParser = require('cookie-parser'); 5 | var logger = require('morgan'); 6 | 7 | var indexRouter = require('./routes/index'); 8 | var usersRouter = require('./routes/users'); 9 | 10 | var favicon = require('serve-favicon'); 11 | var bodyParser = require('body-parser'); 12 | 13 | var app = express(); 14 | 15 | // view engine setup 16 | app.set('views', path.join(__dirname, 'views')); 17 | app.set('view engine', 'jade'); 18 | 19 | app.use(logger('dev')); 20 | app.use(express.json()); 21 | app.use(express.urlencoded({ extended: false })); 22 | app.use(cookieParser()); 23 | app.use(express.static(path.join(__dirname, 'public'))); 24 | 25 | app.use('/', indexRouter); 26 | app.use('/users', usersRouter); 27 | 28 | // catch 404 and forward to error handler 29 | app.use(function(req, res, next) { 30 | next(createError(404)); 31 | }); 32 | 33 | // error handler 34 | app.use(function(err, req, res, next) { 35 | // set locals, only providing error in development 36 | res.locals.message = err.message; 37 | res.locals.error = req.app.get('env') === 'development' ? err : {}; 38 | 39 | // render the error page 40 | res.status(err.status || 500); 41 | res.render('error'); 42 | }); 43 | 44 | module.exports = app; 45 | -------------------------------------------------------------------------------- /Chapter03/node-api/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('node-api:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | } 91 | -------------------------------------------------------------------------------- /Chapter03/node-api/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-api", 3 | "version": "0.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "accepts": { 8 | "version": "1.3.7", 9 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 10 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 11 | "requires": { 12 | "mime-types": "~2.1.24", 13 | "negotiator": "0.6.2" 14 | } 15 | }, 16 | "acorn": { 17 | "version": "2.7.0", 18 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", 19 | "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=" 20 | }, 21 | "acorn-globals": { 22 | "version": "1.0.9", 23 | "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", 24 | "integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=", 25 | "requires": { 26 | "acorn": "^2.1.0" 27 | } 28 | }, 29 | "align-text": { 30 | "version": "0.1.4", 31 | "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", 32 | "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", 33 | "requires": { 34 | "kind-of": "^3.0.2", 35 | "longest": "^1.0.1", 36 | "repeat-string": "^1.5.2" 37 | } 38 | }, 39 | "amdefine": { 40 | "version": "1.0.1", 41 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", 42 | "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" 43 | }, 44 | "array-flatten": { 45 | "version": "1.1.1", 46 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 47 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 48 | }, 49 | "asap": { 50 | "version": "1.0.0", 51 | "resolved": "https://registry.npmjs.org/asap/-/asap-1.0.0.tgz", 52 | "integrity": "sha1-sqRdpf36ILBJb8N2jMJ8EvqRan0=" 53 | }, 54 | "assert-options": { 55 | "version": "0.1.3", 56 | "resolved": "https://registry.npmjs.org/assert-options/-/assert-options-0.1.3.tgz", 57 | "integrity": "sha512-DXrZ5WkCv/igD+H8OmeUTl9k0pBhYSTdyA7DRZoSJERCzQ8Z2v85yDjkhYVnHUOeCXGfCNKaogRbLWQsIQbtpg==" 58 | }, 59 | "basic-auth": { 60 | "version": "2.0.1", 61 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", 62 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", 63 | "requires": { 64 | "safe-buffer": "5.1.2" 65 | } 66 | }, 67 | "bluebird": { 68 | "version": "3.5.4", 69 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz", 70 | "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==" 71 | }, 72 | "body-parser": { 73 | "version": "1.18.3", 74 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", 75 | "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", 76 | "requires": { 77 | "bytes": "3.0.0", 78 | "content-type": "~1.0.4", 79 | "debug": "2.6.9", 80 | "depd": "~1.1.2", 81 | "http-errors": "~1.6.3", 82 | "iconv-lite": "0.4.23", 83 | "on-finished": "~2.3.0", 84 | "qs": "6.5.2", 85 | "raw-body": "2.3.3", 86 | "type-is": "~1.6.16" 87 | } 88 | }, 89 | "buffer-writer": { 90 | "version": "2.0.0", 91 | "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", 92 | "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" 93 | }, 94 | "bytes": { 95 | "version": "3.0.0", 96 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", 97 | "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" 98 | }, 99 | "camelcase": { 100 | "version": "1.2.1", 101 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", 102 | "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" 103 | }, 104 | "center-align": { 105 | "version": "0.1.3", 106 | "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", 107 | "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", 108 | "requires": { 109 | "align-text": "^0.1.3", 110 | "lazy-cache": "^1.0.3" 111 | } 112 | }, 113 | "character-parser": { 114 | "version": "1.2.1", 115 | "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-1.2.1.tgz", 116 | "integrity": "sha1-wN3kqxgnE7kZuXCVmhI+zBow/NY=" 117 | }, 118 | "clean-css": { 119 | "version": "3.4.28", 120 | "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz", 121 | "integrity": "sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=", 122 | "requires": { 123 | "commander": "2.8.x", 124 | "source-map": "0.4.x" 125 | }, 126 | "dependencies": { 127 | "commander": { 128 | "version": "2.8.1", 129 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", 130 | "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", 131 | "requires": { 132 | "graceful-readlink": ">= 1.0.0" 133 | } 134 | } 135 | } 136 | }, 137 | "cliui": { 138 | "version": "2.1.0", 139 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", 140 | "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", 141 | "requires": { 142 | "center-align": "^0.1.1", 143 | "right-align": "^0.1.1", 144 | "wordwrap": "0.0.2" 145 | }, 146 | "dependencies": { 147 | "wordwrap": { 148 | "version": "0.0.2", 149 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", 150 | "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" 151 | } 152 | } 153 | }, 154 | "commander": { 155 | "version": "2.6.0", 156 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", 157 | "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=" 158 | }, 159 | "constantinople": { 160 | "version": "3.0.2", 161 | "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.0.2.tgz", 162 | "integrity": "sha1-S5RdmTeQe82Y7ldRIsOBdRZUQUE=", 163 | "requires": { 164 | "acorn": "^2.1.0" 165 | } 166 | }, 167 | "content-disposition": { 168 | "version": "0.5.2", 169 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", 170 | "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" 171 | }, 172 | "content-type": { 173 | "version": "1.0.4", 174 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 175 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 176 | }, 177 | "cookie": { 178 | "version": "0.3.1", 179 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", 180 | "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" 181 | }, 182 | "cookie-parser": { 183 | "version": "1.4.4", 184 | "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.4.tgz", 185 | "integrity": "sha512-lo13tqF3JEtFO7FyA49CqbhaFkskRJ0u/UAiINgrIXeRCY41c88/zxtrECl8AKH3B0hj9q10+h3Kt8I7KlW4tw==", 186 | "requires": { 187 | "cookie": "0.3.1", 188 | "cookie-signature": "1.0.6" 189 | } 190 | }, 191 | "cookie-signature": { 192 | "version": "1.0.6", 193 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 194 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 195 | }, 196 | "css": { 197 | "version": "1.0.8", 198 | "resolved": "https://registry.npmjs.org/css/-/css-1.0.8.tgz", 199 | "integrity": "sha1-k4aBHKgrzMnuf7WnMrHioxfIo+c=", 200 | "requires": { 201 | "css-parse": "1.0.4", 202 | "css-stringify": "1.0.5" 203 | } 204 | }, 205 | "css-parse": { 206 | "version": "1.0.4", 207 | "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.0.4.tgz", 208 | "integrity": "sha1-OLBQP7+dqfVOnB29pg4UXHcRe90=" 209 | }, 210 | "css-stringify": { 211 | "version": "1.0.5", 212 | "resolved": "https://registry.npmjs.org/css-stringify/-/css-stringify-1.0.5.tgz", 213 | "integrity": "sha1-sNBClG2ylTu50pKQCmy19tASIDE=" 214 | }, 215 | "debug": { 216 | "version": "2.6.9", 217 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 218 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 219 | "requires": { 220 | "ms": "2.0.0" 221 | } 222 | }, 223 | "decamelize": { 224 | "version": "1.2.0", 225 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 226 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" 227 | }, 228 | "depd": { 229 | "version": "1.1.2", 230 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 231 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 232 | }, 233 | "destroy": { 234 | "version": "1.0.4", 235 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 236 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 237 | }, 238 | "ee-first": { 239 | "version": "1.1.1", 240 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 241 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 242 | }, 243 | "encodeurl": { 244 | "version": "1.0.2", 245 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 246 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 247 | }, 248 | "escape-html": { 249 | "version": "1.0.3", 250 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 251 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 252 | }, 253 | "etag": { 254 | "version": "1.8.1", 255 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 256 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 257 | }, 258 | "express": { 259 | "version": "4.16.4", 260 | "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", 261 | "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", 262 | "requires": { 263 | "accepts": "~1.3.5", 264 | "array-flatten": "1.1.1", 265 | "body-parser": "1.18.3", 266 | "content-disposition": "0.5.2", 267 | "content-type": "~1.0.4", 268 | "cookie": "0.3.1", 269 | "cookie-signature": "1.0.6", 270 | "debug": "2.6.9", 271 | "depd": "~1.1.2", 272 | "encodeurl": "~1.0.2", 273 | "escape-html": "~1.0.3", 274 | "etag": "~1.8.1", 275 | "finalhandler": "1.1.1", 276 | "fresh": "0.5.2", 277 | "merge-descriptors": "1.0.1", 278 | "methods": "~1.1.2", 279 | "on-finished": "~2.3.0", 280 | "parseurl": "~1.3.2", 281 | "path-to-regexp": "0.1.7", 282 | "proxy-addr": "~2.0.4", 283 | "qs": "6.5.2", 284 | "range-parser": "~1.2.0", 285 | "safe-buffer": "5.1.2", 286 | "send": "0.16.2", 287 | "serve-static": "1.13.2", 288 | "setprototypeof": "1.1.0", 289 | "statuses": "~1.4.0", 290 | "type-is": "~1.6.16", 291 | "utils-merge": "1.0.1", 292 | "vary": "~1.1.2" 293 | } 294 | }, 295 | "finalhandler": { 296 | "version": "1.1.1", 297 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", 298 | "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", 299 | "requires": { 300 | "debug": "2.6.9", 301 | "encodeurl": "~1.0.2", 302 | "escape-html": "~1.0.3", 303 | "on-finished": "~2.3.0", 304 | "parseurl": "~1.3.2", 305 | "statuses": "~1.4.0", 306 | "unpipe": "~1.0.0" 307 | } 308 | }, 309 | "forwarded": { 310 | "version": "0.1.2", 311 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 312 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 313 | }, 314 | "fresh": { 315 | "version": "0.5.2", 316 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 317 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 318 | }, 319 | "graceful-readlink": { 320 | "version": "1.0.1", 321 | "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", 322 | "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" 323 | }, 324 | "http-errors": { 325 | "version": "1.6.3", 326 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", 327 | "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", 328 | "requires": { 329 | "depd": "~1.1.2", 330 | "inherits": "2.0.3", 331 | "setprototypeof": "1.1.0", 332 | "statuses": ">= 1.4.0 < 2" 333 | } 334 | }, 335 | "iconv-lite": { 336 | "version": "0.4.23", 337 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", 338 | "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", 339 | "requires": { 340 | "safer-buffer": ">= 2.1.2 < 3" 341 | } 342 | }, 343 | "inherits": { 344 | "version": "2.0.3", 345 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 346 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 347 | }, 348 | "ipaddr.js": { 349 | "version": "1.9.0", 350 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", 351 | "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" 352 | }, 353 | "is-buffer": { 354 | "version": "1.1.6", 355 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 356 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" 357 | }, 358 | "is-promise": { 359 | "version": "2.1.0", 360 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", 361 | "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" 362 | }, 363 | "jade": { 364 | "version": "1.11.0", 365 | "resolved": "https://registry.npmjs.org/jade/-/jade-1.11.0.tgz", 366 | "integrity": "sha1-nIDlOMEtP7lcjZu5VZ+gzAQEBf0=", 367 | "requires": { 368 | "character-parser": "1.2.1", 369 | "clean-css": "^3.1.9", 370 | "commander": "~2.6.0", 371 | "constantinople": "~3.0.1", 372 | "jstransformer": "0.0.2", 373 | "mkdirp": "~0.5.0", 374 | "transformers": "2.1.0", 375 | "uglify-js": "^2.4.19", 376 | "void-elements": "~2.0.1", 377 | "with": "~4.0.0" 378 | } 379 | }, 380 | "jstransformer": { 381 | "version": "0.0.2", 382 | "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-0.0.2.tgz", 383 | "integrity": "sha1-eq4pqQPRls+glz2IXT5HlH7Ndqs=", 384 | "requires": { 385 | "is-promise": "^2.0.0", 386 | "promise": "^6.0.1" 387 | } 388 | }, 389 | "kind-of": { 390 | "version": "3.2.2", 391 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", 392 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", 393 | "requires": { 394 | "is-buffer": "^1.1.5" 395 | } 396 | }, 397 | "lazy-cache": { 398 | "version": "1.0.4", 399 | "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", 400 | "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" 401 | }, 402 | "longest": { 403 | "version": "1.0.1", 404 | "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", 405 | "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" 406 | }, 407 | "manakin": { 408 | "version": "0.5.2", 409 | "resolved": "https://registry.npmjs.org/manakin/-/manakin-0.5.2.tgz", 410 | "integrity": "sha512-pfDSB7QYoVg0Io4KMV9hhPoXpj6p0uBscgtyUSKCOFZe8bqgbpStfgnKIbF/ulnr6U3ICu4OqdyxAqBgOhZwBQ==" 411 | }, 412 | "media-typer": { 413 | "version": "0.3.0", 414 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 415 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 416 | }, 417 | "merge-descriptors": { 418 | "version": "1.0.1", 419 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 420 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 421 | }, 422 | "methods": { 423 | "version": "1.1.2", 424 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 425 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 426 | }, 427 | "mime": { 428 | "version": "1.4.1", 429 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", 430 | "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" 431 | }, 432 | "mime-db": { 433 | "version": "1.40.0", 434 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", 435 | "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" 436 | }, 437 | "mime-types": { 438 | "version": "2.1.24", 439 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", 440 | "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", 441 | "requires": { 442 | "mime-db": "1.40.0" 443 | } 444 | }, 445 | "minimist": { 446 | "version": "0.0.8", 447 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 448 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" 449 | }, 450 | "mkdirp": { 451 | "version": "0.5.1", 452 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 453 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 454 | "requires": { 455 | "minimist": "0.0.8" 456 | } 457 | }, 458 | "morgan": { 459 | "version": "1.9.1", 460 | "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", 461 | "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", 462 | "requires": { 463 | "basic-auth": "~2.0.0", 464 | "debug": "2.6.9", 465 | "depd": "~1.1.2", 466 | "on-finished": "~2.3.0", 467 | "on-headers": "~1.0.1" 468 | } 469 | }, 470 | "ms": { 471 | "version": "2.0.0", 472 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 473 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 474 | }, 475 | "negotiator": { 476 | "version": "0.6.2", 477 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 478 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 479 | }, 480 | "on-finished": { 481 | "version": "2.3.0", 482 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 483 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 484 | "requires": { 485 | "ee-first": "1.1.1" 486 | } 487 | }, 488 | "on-headers": { 489 | "version": "1.0.2", 490 | "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", 491 | "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" 492 | }, 493 | "optimist": { 494 | "version": "0.3.7", 495 | "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", 496 | "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", 497 | "requires": { 498 | "wordwrap": "~0.0.2" 499 | } 500 | }, 501 | "packet-reader": { 502 | "version": "1.0.0", 503 | "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", 504 | "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" 505 | }, 506 | "parseurl": { 507 | "version": "1.3.3", 508 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 509 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 510 | }, 511 | "path-to-regexp": { 512 | "version": "0.1.7", 513 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 514 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 515 | }, 516 | "pg": { 517 | "version": "7.11.0", 518 | "resolved": "https://registry.npmjs.org/pg/-/pg-7.11.0.tgz", 519 | "integrity": "sha512-YO4V7vCmEMGoF390LJaFaohWNKaA2ayoQOEZmiHVcAUF+YsRThpf/TaKCgSvsSE7cDm37Q/Cy3Gz41xiX/XjTw==", 520 | "requires": { 521 | "buffer-writer": "2.0.0", 522 | "packet-reader": "1.0.0", 523 | "pg-connection-string": "0.1.3", 524 | "pg-pool": "^2.0.4", 525 | "pg-types": "~2.0.0", 526 | "pgpass": "1.x", 527 | "semver": "4.3.2" 528 | } 529 | }, 530 | "pg-connection-string": { 531 | "version": "0.1.3", 532 | "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-0.1.3.tgz", 533 | "integrity": "sha1-2hhHsglA5C7hSSvq9l1J2RskXfc=" 534 | }, 535 | "pg-int8": { 536 | "version": "1.0.1", 537 | "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", 538 | "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" 539 | }, 540 | "pg-minify": { 541 | "version": "1.2.0", 542 | "resolved": "https://registry.npmjs.org/pg-minify/-/pg-minify-1.2.0.tgz", 543 | "integrity": "sha512-T5oIs7KRDUghFrR73Dwqj6CSMJUQYZWqbPmDz312VcvZrTdG2SKy5AzSJJz4snZkLRMzXbNjhOZfqI/CH0IKPw==" 544 | }, 545 | "pg-pool": { 546 | "version": "2.0.6", 547 | "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-2.0.6.tgz", 548 | "integrity": "sha512-hod2zYQxM8Gt482q+qONGTYcg/qVcV32VHVPtktbBJs0us3Dj7xibISw0BAAXVMCzt8A/jhfJvpZaxUlqtqs0g==" 549 | }, 550 | "pg-promise": { 551 | "version": "8.7.2", 552 | "resolved": "https://registry.npmjs.org/pg-promise/-/pg-promise-8.7.2.tgz", 553 | "integrity": "sha512-vPKl8TFujeaQbSz4t+ltf6zAfBkKFZznWmoKeiNN7LHQLnj2toEomyCbKmDdFMfSIPmkJ3seQKC7AQhOV2bg2A==", 554 | "requires": { 555 | "assert-options": "0.1.3", 556 | "manakin": "0.5.2", 557 | "pg": "7.11.0", 558 | "pg-minify": "1.2.0", 559 | "spex": "2.2.0" 560 | } 561 | }, 562 | "pg-types": { 563 | "version": "2.0.1", 564 | "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.0.1.tgz", 565 | "integrity": "sha512-b7y6QM1VF5nOeX9ukMQ0h8a9z89mojrBHXfJeSug4mhL0YpxNBm83ot2TROyoAmX/ZOX3UbwVO4EbH7i1ZZNiw==", 566 | "requires": { 567 | "pg-int8": "1.0.1", 568 | "postgres-array": "~2.0.0", 569 | "postgres-bytea": "~1.0.0", 570 | "postgres-date": "~1.0.4", 571 | "postgres-interval": "^1.1.0" 572 | } 573 | }, 574 | "pgpass": { 575 | "version": "1.0.2", 576 | "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.2.tgz", 577 | "integrity": "sha1-Knu0G2BltnkH6R2hsHwYR8h3swY=", 578 | "requires": { 579 | "split": "^1.0.0" 580 | } 581 | }, 582 | "postgres-array": { 583 | "version": "2.0.0", 584 | "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", 585 | "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==" 586 | }, 587 | "postgres-bytea": { 588 | "version": "1.0.0", 589 | "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", 590 | "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=" 591 | }, 592 | "postgres-date": { 593 | "version": "1.0.4", 594 | "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.4.tgz", 595 | "integrity": "sha512-bESRvKVuTrjoBluEcpv2346+6kgB7UlnqWZsnbnCccTNq/pqfj1j6oBaN5+b/NrDXepYUT/HKadqv3iS9lJuVA==" 596 | }, 597 | "postgres-interval": { 598 | "version": "1.2.0", 599 | "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", 600 | "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", 601 | "requires": { 602 | "xtend": "^4.0.0" 603 | } 604 | }, 605 | "promise": { 606 | "version": "6.1.0", 607 | "resolved": "https://registry.npmjs.org/promise/-/promise-6.1.0.tgz", 608 | "integrity": "sha1-LOcp9rlLRcJoka0GAsXJDgTG7vY=", 609 | "requires": { 610 | "asap": "~1.0.0" 611 | } 612 | }, 613 | "proxy-addr": { 614 | "version": "2.0.5", 615 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", 616 | "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", 617 | "requires": { 618 | "forwarded": "~0.1.2", 619 | "ipaddr.js": "1.9.0" 620 | } 621 | }, 622 | "qs": { 623 | "version": "6.5.2", 624 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", 625 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" 626 | }, 627 | "range-parser": { 628 | "version": "1.2.0", 629 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", 630 | "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" 631 | }, 632 | "raw-body": { 633 | "version": "2.3.3", 634 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", 635 | "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", 636 | "requires": { 637 | "bytes": "3.0.0", 638 | "http-errors": "1.6.3", 639 | "iconv-lite": "0.4.23", 640 | "unpipe": "1.0.0" 641 | } 642 | }, 643 | "repeat-string": { 644 | "version": "1.6.1", 645 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", 646 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" 647 | }, 648 | "right-align": { 649 | "version": "0.1.3", 650 | "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", 651 | "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", 652 | "requires": { 653 | "align-text": "^0.1.1" 654 | } 655 | }, 656 | "safe-buffer": { 657 | "version": "5.1.2", 658 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 659 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 660 | }, 661 | "safer-buffer": { 662 | "version": "2.1.2", 663 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 664 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 665 | }, 666 | "semver": { 667 | "version": "4.3.2", 668 | "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.2.tgz", 669 | "integrity": "sha1-x6BxWKgL7dBSNVt3DYLWZA+AO+c=" 670 | }, 671 | "send": { 672 | "version": "0.16.2", 673 | "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", 674 | "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", 675 | "requires": { 676 | "debug": "2.6.9", 677 | "depd": "~1.1.2", 678 | "destroy": "~1.0.4", 679 | "encodeurl": "~1.0.2", 680 | "escape-html": "~1.0.3", 681 | "etag": "~1.8.1", 682 | "fresh": "0.5.2", 683 | "http-errors": "~1.6.2", 684 | "mime": "1.4.1", 685 | "ms": "2.0.0", 686 | "on-finished": "~2.3.0", 687 | "range-parser": "~1.2.0", 688 | "statuses": "~1.4.0" 689 | } 690 | }, 691 | "serve-favicon": { 692 | "version": "2.5.0", 693 | "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.0.tgz", 694 | "integrity": "sha1-k10kDN/g9YBTB/3+ln2IlCosvPA=", 695 | "requires": { 696 | "etag": "~1.8.1", 697 | "fresh": "0.5.2", 698 | "ms": "2.1.1", 699 | "parseurl": "~1.3.2", 700 | "safe-buffer": "5.1.1" 701 | }, 702 | "dependencies": { 703 | "ms": { 704 | "version": "2.1.1", 705 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 706 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 707 | }, 708 | "safe-buffer": { 709 | "version": "5.1.1", 710 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", 711 | "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" 712 | } 713 | } 714 | }, 715 | "serve-static": { 716 | "version": "1.13.2", 717 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", 718 | "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", 719 | "requires": { 720 | "encodeurl": "~1.0.2", 721 | "escape-html": "~1.0.3", 722 | "parseurl": "~1.3.2", 723 | "send": "0.16.2" 724 | } 725 | }, 726 | "setprototypeof": { 727 | "version": "1.1.0", 728 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", 729 | "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" 730 | }, 731 | "source-map": { 732 | "version": "0.4.4", 733 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", 734 | "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", 735 | "requires": { 736 | "amdefine": ">=0.0.4" 737 | } 738 | }, 739 | "spex": { 740 | "version": "2.2.0", 741 | "resolved": "https://registry.npmjs.org/spex/-/spex-2.2.0.tgz", 742 | "integrity": "sha512-iwBxqKe4ZKD+P/i/WdzWw5qxmerHvzVb29wQm4zwYaDPuwsTKjS7nbqt8OyBSLAi2q0ZFUN3F2b4erX0UwF0fA==" 743 | }, 744 | "split": { 745 | "version": "1.0.1", 746 | "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", 747 | "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", 748 | "requires": { 749 | "through": "2" 750 | } 751 | }, 752 | "statuses": { 753 | "version": "1.4.0", 754 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", 755 | "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" 756 | }, 757 | "through": { 758 | "version": "2.3.8", 759 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 760 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" 761 | }, 762 | "transformers": { 763 | "version": "2.1.0", 764 | "resolved": "https://registry.npmjs.org/transformers/-/transformers-2.1.0.tgz", 765 | "integrity": "sha1-XSPLNVYd2F3Gf7hIIwm0fVPM6ac=", 766 | "requires": { 767 | "css": "~1.0.8", 768 | "promise": "~2.0", 769 | "uglify-js": "~2.2.5" 770 | }, 771 | "dependencies": { 772 | "is-promise": { 773 | "version": "1.0.1", 774 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz", 775 | "integrity": "sha1-MVc3YcBX4zwukaq56W2gjO++duU=" 776 | }, 777 | "promise": { 778 | "version": "2.0.0", 779 | "resolved": "https://registry.npmjs.org/promise/-/promise-2.0.0.tgz", 780 | "integrity": "sha1-RmSKqdYFr10ucMMCS/WUNtoCuA4=", 781 | "requires": { 782 | "is-promise": "~1" 783 | } 784 | }, 785 | "source-map": { 786 | "version": "0.1.43", 787 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", 788 | "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", 789 | "requires": { 790 | "amdefine": ">=0.0.4" 791 | } 792 | }, 793 | "uglify-js": { 794 | "version": "2.2.5", 795 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.5.tgz", 796 | "integrity": "sha1-puAqcNg5eSuXgEiLe4sYTAlcmcc=", 797 | "requires": { 798 | "optimist": "~0.3.5", 799 | "source-map": "~0.1.7" 800 | } 801 | } 802 | } 803 | }, 804 | "type-is": { 805 | "version": "1.6.18", 806 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 807 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 808 | "requires": { 809 | "media-typer": "0.3.0", 810 | "mime-types": "~2.1.24" 811 | } 812 | }, 813 | "uglify-js": { 814 | "version": "2.8.29", 815 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", 816 | "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", 817 | "requires": { 818 | "source-map": "~0.5.1", 819 | "uglify-to-browserify": "~1.0.0", 820 | "yargs": "~3.10.0" 821 | }, 822 | "dependencies": { 823 | "source-map": { 824 | "version": "0.5.7", 825 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 826 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" 827 | } 828 | } 829 | }, 830 | "uglify-to-browserify": { 831 | "version": "1.0.2", 832 | "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", 833 | "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", 834 | "optional": true 835 | }, 836 | "unpipe": { 837 | "version": "1.0.0", 838 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 839 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 840 | }, 841 | "utils-merge": { 842 | "version": "1.0.1", 843 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 844 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 845 | }, 846 | "vary": { 847 | "version": "1.1.2", 848 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 849 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 850 | }, 851 | "void-elements": { 852 | "version": "2.0.1", 853 | "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", 854 | "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=" 855 | }, 856 | "window-size": { 857 | "version": "0.1.0", 858 | "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", 859 | "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" 860 | }, 861 | "with": { 862 | "version": "4.0.3", 863 | "resolved": "https://registry.npmjs.org/with/-/with-4.0.3.tgz", 864 | "integrity": "sha1-7v0VTp550sjTQXtkeo8U2f7M4U4=", 865 | "requires": { 866 | "acorn": "^1.0.1", 867 | "acorn-globals": "^1.0.3" 868 | }, 869 | "dependencies": { 870 | "acorn": { 871 | "version": "1.2.2", 872 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", 873 | "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=" 874 | } 875 | } 876 | }, 877 | "wordwrap": { 878 | "version": "0.0.3", 879 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", 880 | "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" 881 | }, 882 | "xtend": { 883 | "version": "4.0.1", 884 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", 885 | "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" 886 | }, 887 | "yargs": { 888 | "version": "3.10.0", 889 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", 890 | "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", 891 | "requires": { 892 | "camelcase": "^1.0.2", 893 | "cliui": "^2.1.0", 894 | "decamelize": "^1.0.0", 895 | "window-size": "0.1.0" 896 | } 897 | } 898 | } 899 | } 900 | -------------------------------------------------------------------------------- /Chapter03/node-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-api", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "bluebird": "^3.5.4", 10 | "cookie-parser": "~1.4.4", 11 | "debug": "~2.6.9", 12 | "express": "~4.16.1", 13 | "http-errors": "~1.6.3", 14 | "jade": "~1.11.0", 15 | "morgan": "~1.9.1", 16 | "pg-promise": "^8.7.2", 17 | "serve-favicon": "^2.5.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chapter03/node-api/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ATM App - with Node + Express + Angular + PostgreSQL 5 | 6 | 7 | 8 | 9 |
10 |
11 |

ATM App

12 |
13 |

Node + Express + Angular + PostgreSQL

14 |
15 | 16 |
17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 |
28 |
29 | 30 |
31 | 32 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Chapter03/node-api/public/javascripts/app.js: -------------------------------------------------------------------------------- 1 | angular.module('nodeATM', []) 2 | 3 | .controller('mainController', function($scope, $http) { 4 | 5 | $scope.formData = {}; 6 | $scope.atmData = {}; 7 | $scope.formData.County = "New York"; 8 | $scope.formData.City = "New York"; 9 | $scope.formData.State = "NY"; 10 | 11 | 12 | // Get all atms 13 | $http.get('/api/atm-locations') 14 | .success(function(data) { 15 | $scope.atmData = data["data"]; 16 | console.log(data["data"]); 17 | }) 18 | .error(function(error) { 19 | console.log('Error: ' + error); 20 | }); 21 | 22 | // Create a new atm 23 | $scope.createATM = function() { 24 | $http.post('/api/atm-locations', $scope.formData) 25 | .success(function(res) { 26 | $scope.formData = {}; 27 | 28 | $http.get('/api/atm-locations') 29 | .success(function(data) { 30 | $scope.atmData = data["data"]; 31 | console.log(data["data"]); 32 | }) 33 | .error(function(error) { 34 | console.log('Error: ' + error); 35 | }); 36 | 37 | console.log(res); 38 | }) 39 | .error(function(error) { 40 | console.log('Error: ' + error); 41 | }); 42 | }; 43 | 44 | // Delete a atm 45 | $scope.deleteATM = function(atmID) { 46 | $http.delete('/api/atm-locations/' + atmID) 47 | .success(function(res) { 48 | $http.get('/api/atm-locations') 49 | .success(function(data) { 50 | $scope.atmData = data["data"]; 51 | console.log(data["data"]); 52 | }) 53 | .error(function(error) { 54 | console.log('Error: ' + error); 55 | }); 56 | 57 | console.log(res); 58 | }) 59 | .error(function(data) { 60 | console.log('Error: ' + data); 61 | }); 62 | }; 63 | 64 | 65 | }); 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /Chapter03/node-api/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /Chapter03/node-api/queries.js: -------------------------------------------------------------------------------- 1 | var promise = require('bluebird'); 2 | 3 | var options = { 4 | // Initialization Options 5 | promiseLib: promise 6 | }; 7 | 8 | var pgp = require('pg-promise')(options); 9 | var connectionString = 'postgres://dba:bookdemo@atm.c3qdepivtce8.us-east-1.rds.amazonaws.com:5432/atm'; 10 | var db = pgp(connectionString); 11 | 12 | // add query functions 13 | 14 | module.exports = { 15 | getAllATMLocations: getAllATMLocations, 16 | getSingleATMLocation: getSingleATMLocation, 17 | createATMLocation: createATMLocation, 18 | updateATMLocation: updateATMLocation, 19 | removeATMLocation: removeATMLocation 20 | }; 21 | 22 | function getAllATMLocations(req, res, next) { 23 | db.any('select * from public."ATM locations"') 24 | .then(function (data) { 25 | res.status(200) 26 | .json({ 27 | status: 'success', 28 | data: data, 29 | message: 'Retrieved ALL ATM locations', 30 | }); 31 | }) 32 | .catch(function (err) { 33 | return next(err); 34 | }); 35 | } 36 | 37 | function getSingleATMLocation(req, res, next) { 38 | var atmID = parseInt(req.params.id); 39 | console.log(atmID); 40 | 41 | db.one('select * from public."ATM locations" where "ID" = $1', atmID) 42 | .then(function (data) { 43 | res.status(200) 44 | .json({ 45 | status: 'success', 46 | data: data, 47 | message: 'Retrieved ONE ATM location' 48 | }); 49 | }) 50 | .catch(function (err) { 51 | return next(err); 52 | }); 53 | } 54 | 55 | function createATMLocation(req, res, next) { 56 | db.none('insert into public."ATM locations"("BankName", "Address", "County", "City", "State", "ZipCode")' + 57 | 'values(${BankName}, ${Address}, ${County}, ${City}, ${State}, ${ZipCode})', 58 | req.body) 59 | .then(function () { 60 | res.status(200) 61 | .json({ 62 | status: 'success', 63 | message: 'Inserted ONE ATM Location' 64 | }); 65 | }) 66 | .catch(function (err) { 67 | return next(err); 68 | }); 69 | } 70 | 71 | 72 | function updateATMLocation(req, res, next) { 73 | var atmID = parseInt(req.params.id); 74 | console.log(atmID); 75 | 76 | var field = req.body.field; 77 | var newvalue = req.body.newvalue; 78 | console.log(field); 79 | console.log(newvalue); 80 | 81 | db.none('update public."ATM locations" set "'+field+'" = \''+newvalue+'\' where "ID" = '+ atmID) 82 | .then(function () { 83 | res.status(200) 84 | .json({ 85 | status: 'success', 86 | message: 'Updated ATM Location' 87 | }); 88 | }) 89 | .catch(function (err) { 90 | return next(err); 91 | }); 92 | } 93 | 94 | function removeATMLocation(req, res, next) { 95 | var atmID = parseInt(req.params.id); 96 | db.result('delete from public."ATM locations" where "ID" = $1', atmID) 97 | .then(function (result) { 98 | /* jshint ignore:start */ 99 | res.status(200) 100 | .json({ 101 | status: 'success', 102 | message: 'Removed an ATM Location' 103 | }); 104 | /* jshint ignore:end */ 105 | }) 106 | .catch(function (err) { 107 | return next(err); 108 | }); 109 | } 110 | -------------------------------------------------------------------------------- /Chapter03/node-api/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var path = require('path'); 4 | 5 | var db = require('../queries'); 6 | 7 | 8 | router.get('/api/atm-locations', db.getAllATMLocations); 9 | router.get('/api/atm-locations/:id', db.getSingleATMLocation); 10 | router.post('/api/atm-locations', db.createATMLocation); 11 | router.put('/api/atm-locations/:id', db.updateATMLocation); 12 | router.delete('/api/atm-locations/:id', db.removeATMLocation); 13 | 14 | router.get('/', function(req, res, next) { 15 | res.sendFile('index.html'); 16 | }); 17 | 18 | module.exports = router; 19 | 20 | -------------------------------------------------------------------------------- /Chapter03/node-api/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /Chapter03/node-api/test/test.js: -------------------------------------------------------------------------------- 1 | let chai = require('chai'); 2 | let chaiHttp = require('chai-http'); 3 | let server = require('../app'); 4 | let should = chai.should(); 5 | 6 | 7 | chai.use(chaiHttp); 8 | 9 | describe('/GET atm', () => { 10 | it('it should GET all the ATMs', (done) => { 11 | chai.request(server) 12 | .get('/api/atm-locations') 13 | .end((err, res) => { 14 | res.should.have.status(200); 15 | 16 | let data = res.body["data"]; 17 | let rstatus = res.body["status"]; 18 | 19 | rstatus.should.be.eql('success'); 20 | data.should.be.a('array'); 21 | data.length.should.be.eql(654); 22 | done(); 23 | }); 24 | }); 25 | }); 26 | 27 | /* 28 | * Test the /POST route 29 | */ 30 | describe('/POST atm', () => { 31 | it('it should POST an atm', (done) => { 32 | let atm = { 33 | BankName: "TEST BANK", 34 | Address: "999 Test Blvd", 35 | County: "New York", 36 | City: "New York", 37 | State: "NY", 38 | ZipCode: 999999 39 | } 40 | chai.request(server) 41 | .post('/api/atm-locations') 42 | .send(atm) 43 | .end((err, res) => { 44 | res.should.have.status(200); 45 | let rstatus = res.body["status"]; 46 | let rmessage = res.body["message"]; 47 | 48 | rstatus.should.be.eql('success'); 49 | rmessage.should.be.eql('Inserted ONE ATM Location'); 50 | done(); 51 | }); 52 | }); 53 | 54 | }); 55 | 56 | /* 57 | * Test GET an atm 58 | */ 59 | 60 | describe('/GET one atm', () => { 61 | it('it should GET the new added atm', (done) => { 62 | chai.request(server) 63 | .get('/api/atm-locations/640') 64 | .end((err, res) => { 65 | let atm = { 66 | ID: 640, 67 | BankName: "HSBC Bank USA, National Association", 68 | Address: "45 East 89th Street", 69 | County: "New York", 70 | City: "New York", 71 | State: "NY", 72 | ZipCode: 10128 73 | } 74 | res.should.have.status(200); 75 | let data = res.body["data"]; 76 | let rstatus = res.body["status"]; 77 | let rmessage = res.body["message"]; 78 | 79 | data.should.be.eql(atm); 80 | rstatus.should.be.eql('success'); 81 | rmessage.should.be.eql('Retrieved ONE ATM location'); 82 | done(); 83 | }); 84 | }); 85 | 86 | }); 87 | 88 | /* 89 | * Delete the new added atm 90 | */ 91 | describe('/DELETE atm', () => { 92 | it('it should DELETE the new added atm', (done) => { 93 | chai.request(server) 94 | .delete('/api/atm-locations/655') 95 | .end((err, res) => { 96 | res.should.have.status(200); 97 | let rstatus = res.body["status"]; 98 | let rmessage = res.body["message"]; 99 | 100 | rstatus.should.be.eql('success'); 101 | rmessage.should.be.eql('Removed ${result.rowCount} ATM Location'); 102 | done(); 103 | }); 104 | }); 105 | 106 | }); 107 | -------------------------------------------------------------------------------- /Chapter03/node-api/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /Chapter03/node-api/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /Chapter03/node-api/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /Chapter04/Django_Script.sh: -------------------------------------------------------------------------------- 1 | [centos@ip-172-31-95-213 ~]$ sudo su 2 | [root@ip-172-31-95-213 centos]# cd /usr/local/src/ 3 | 4 | # Install Python 3.7 5 | [root@ip-172-31-95-213 src]# yum install gcc openssl-devel bzip2-devel libffi-devel 6 | [root@ip-172-31-95-213 src]# wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz 7 | [root@ip-172-31-95-213 src]# tar xzf Python-3.7.3.tgz 8 | [root@ip-172-31-95-213 src]# cd Python-3.7.3 9 | [root@ip-172-31-95-213 Python-3.7.3]# ./configure --enable-optimizations 10 | [root@ip-172-31-95-213 Python-3.7.3]# make altinstall 11 | [root@ip-172-31-95-213 Python-3.7.3]# rm /usr/local/src/Python-3.7.3.tgz 12 | [root@ip-172-31-95-213 Python-3.7.3] 13 | [root@ip-172-31-95-213 Python-3.7.3]# python3.7 -V 14 | [root@ip-172-31-95-213 Python-3.7.3]# cd .. 15 | [root@ip-172-31-95-213 src]# 16 | 17 | # Create a virtual environment for our Django application. 18 | [root@ip-172-31-95-213 src]# mkdir django_app 19 | [root@ip-172-31-95-213 src]# cd django_app 20 | [root@ip-172-31-95-213 django_app] 21 | [root@ip-172-31-95-213 django_app]# python3.7 -m venv venv 22 | [root@ip-172-31-95-213 django_app]# ls 23 | [root@ip-172-31-95-213 django_app]# source venv/bin/activate 24 | (venv) [root@ip-172-31-95-213 django_app]# echo $PATH 25 | 26 | # Install Django 27 | (venv) [root@ip-172-31-95-213 django_app]# pip3 install django 28 | (venv) [root@ip-172-31-95-213 django_app]# python3.7 -m django --version 29 | 30 | # Install SQLite 3.29 31 | (venv) [root@ip-172-31-95-213 django_app]# cd .. 32 | (venv) [root@ip-172-31-95-213 src]# wget https://www.sqlite.org/2019/sqlite-autoconf-3290000.tar.gz 33 | (venv) [root@ip-172-31-95-213 src]# tar zxvf sqlite-autoconf-3290000.tar.gz 34 | (venv) [root@ip-172-31-95-213 src]# cd sqlite-autoconf-3290000 35 | (venv) [root@ip-172-31-95-213 sqlite-autoconf-3290000]# ./configure --prefix=$HOME/opt/sqlite 36 | (venv) [root@ip-172-31-95-213 sqlite-autoconf-3290000]# make && make install 37 | (venv) [root@ip-172-31-95-213 sqlite-autoconf-3290000]# export PATH=$HOME/opt/sqlite/bin:$PATH 38 | (venv) [root@ip-172-31-95-213 sqlite-autoconf-3290000]# export LD_LIBRARY_PATH=$HOME/opt/sqlite/lib 39 | (venv) [root@ip-172-31-95-213 sqlite-autoconf-3290000]# export LD_RUN_PATH=$HOME/opt/sqlite/lib 40 | (venv) [root@ip-172-31-95-213 sqlite-autoconf-3290000]# source ~/.bash_profile 41 | (venv) [root@ip-172-31-95-213 sqlite-autoconf-3290000]# sqlite3 --version 42 | 3.29.0 2019-07-10 17:32:03 fc82b73eaac8b36950e527f12c4b5dc1e147e6f4ad2217ae43ad82882a88bfa6 43 | (venv) [root@ip-172-31-95-213 sqlite-autoconf-3290000]# cd .. 44 | (venv) [root@ip-172-31-95-213 src]# rm sqlite-autoconf-3290000.tar.gz 45 | rm: remove regular file ‘sqlite-autoconf-3290000.tar.gz’? y 46 | (venv) [root@ip-172-31-95-213 src]# cd django_app 47 | (venv) [root@ip-172-31-95-213 django_app]# 48 | 49 | # Create a Django Project 50 | (venv) [root@ip-172-31-95-213 django_app]# django-admin startproject atmproject 51 | (venv) [root@ip-172-31-95-213 django_app]# yum install tree -y 52 | (venv) [root@ip-172-31-95-213 django_app]# tree atmproject 53 | 54 | # Create the ATM app 55 | (venv) [root@ip-172-31-95-213 django_app]# cd atmproject 56 | (venv) [root@ip-172-31-95-213 atmproject]# python3.7 manage.py startapp atmapp 57 | (venv) [root@ip-172-31-95-213 atmproject]# tree atmapp 58 | 59 | # Django Database Settings with PostgreSQL 60 | (venv) [root@ip-172-31-95-213 atmproject]# pip3 install psycopg2-binary 61 | (venv) [root@ip-172-31-95-213 atmproject]# vi atmproject/settings.py 62 | ------------------------------------------ 63 | DATABASES = { 64 | 'default': { 65 | 'ENGINE': 'django.db.backends.postgresql_psycopg2', 66 | 'NAME': 'atm', 67 | 'USER': 'dba', 68 | 'PASSWORD': 'bookdemo', 69 | 'HOST': 'atm.c3qdepivtce8.us-east-1.rds.amazonaws.com', 70 | 'PORT': '5432', 71 | } 72 | } 73 | ------------------------------------------ 74 | 75 | (venv) [root@ip-172-31-95-213 atmproject]# python3.7 manage.py migrate 76 | 77 | # Create super user 78 | (venv) [root@ip-172-31-95-213 atmproject]# python3.7 manage.py createsuperuser 79 | (venv) [root@ip-172-31-95-213 atmproject]# vi atmproject/settings.py 80 | ------------------------------------------ 81 | ALLOWED_HOSTS = ['3.209.184.46', 'ec2-3-209-184-46.compute-1.amazonaws.com'] 82 | AUTHENTICATION_BACKENDS = ( 83 | ('django.contrib.auth.backends.ModelBackend'), 84 | ) 85 | ------------------------------------------ 86 | 87 | (venv) [root@ip-172-31-95-213 atmproject]# python3.7 manage.py runserver 0:8000 88 | 89 | # Database model 90 | (venv) [root@ip-172-31-95-213 atmproject]# vi atmapp/models.py 91 | ------------------------------------------ 92 | from django.db import models 93 | 94 | # Create your models here. 95 | class ATMlocations(models.Model): 96 | ID = models.AutoField(primary_key=True) 97 | BankName = models.CharField(max_length=60) 98 | Address = models.CharField(max_length=50) 99 | County = models.CharField(max_length=15) 100 | City = models.CharField(max_length=15) 101 | State = models.CharField(max_length=2) 102 | ZipCode = models.IntegerField() 103 | 104 | class Meta: 105 | db_table = 'ATM locations' 106 | verbose_name = 'ATM location' 107 | verbose_name_plural = 'ATM locations' 108 | ------------------------------------------ 109 | 110 | (venv) [root@ip-172-31-95-213 atmproject]# cat atmapp/apps.py 111 | ------------------------------------------ 112 | from django.apps import AppConfig 113 | 114 | class AtmappConfig(AppConfig): 115 | name = 'atmapp' 116 | ------------------------------------------ 117 | 118 | # Migrating the Database 119 | (venv) [root@ip-172-31-95-213 atmproject]# python3.7 manage.py makemigrations atmapp 120 | (venv) [root@ip-172-31-95-213 atmproject]# python3.7 manage.py sqlmigrate atmapp 0001 121 | (venv) [root@ip-172-31-95-213 atmproject]# python3.7 manage.py migrate 122 | 123 | [root@ip-172-31-95-213 atmproject]# vi atmapp/admin.py 124 | ------------------------------------------ 125 | from django.contrib import admin 126 | 127 | # Register your models here. 128 | 129 | from .models import ATMlocations 130 | 131 | admin.site.register(ATMlocations) 132 | ------------------------------------------ 133 | 134 | (venv) [root@ip-172-31-95-213 atmproject]# python3.7 manage.py runserver 0:8000 135 | 136 | -------------------------------------------------------------------------------- /Chapter04/Figure4-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-1.png -------------------------------------------------------------------------------- /Chapter04/Figure4-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-10.png -------------------------------------------------------------------------------- /Chapter04/Figure4-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-11.png -------------------------------------------------------------------------------- /Chapter04/Figure4-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-12.png -------------------------------------------------------------------------------- /Chapter04/Figure4-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-13.png -------------------------------------------------------------------------------- /Chapter04/Figure4-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-14.png -------------------------------------------------------------------------------- /Chapter04/Figure4-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-15.png -------------------------------------------------------------------------------- /Chapter04/Figure4-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-16.png -------------------------------------------------------------------------------- /Chapter04/Figure4-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-17.png -------------------------------------------------------------------------------- /Chapter04/Figure4-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-18.png -------------------------------------------------------------------------------- /Chapter04/Figure4-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-19.png -------------------------------------------------------------------------------- /Chapter04/Figure4-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-2.png -------------------------------------------------------------------------------- /Chapter04/Figure4-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-20.png -------------------------------------------------------------------------------- /Chapter04/Figure4-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-21.png -------------------------------------------------------------------------------- /Chapter04/Figure4-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-22.png -------------------------------------------------------------------------------- /Chapter04/Figure4-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-3.png -------------------------------------------------------------------------------- /Chapter04/Figure4-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-4.png -------------------------------------------------------------------------------- /Chapter04/Figure4-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-5.png -------------------------------------------------------------------------------- /Chapter04/Figure4-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-6.png -------------------------------------------------------------------------------- /Chapter04/Figure4-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-7.png -------------------------------------------------------------------------------- /Chapter04/Figure4-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-8.png -------------------------------------------------------------------------------- /Chapter04/Figure4-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter04/Figure4-9.png -------------------------------------------------------------------------------- /Chapter05/Figure5-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-1.png -------------------------------------------------------------------------------- /Chapter05/Figure5-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-10.png -------------------------------------------------------------------------------- /Chapter05/Figure5-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-11.png -------------------------------------------------------------------------------- /Chapter05/Figure5-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-12.png -------------------------------------------------------------------------------- /Chapter05/Figure5-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-13.png -------------------------------------------------------------------------------- /Chapter05/Figure5-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-14.png -------------------------------------------------------------------------------- /Chapter05/Figure5-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-15.png -------------------------------------------------------------------------------- /Chapter05/Figure5-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-16.png -------------------------------------------------------------------------------- /Chapter05/Figure5-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-17.png -------------------------------------------------------------------------------- /Chapter05/Figure5-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-18.png -------------------------------------------------------------------------------- /Chapter05/Figure5-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-19.png -------------------------------------------------------------------------------- /Chapter05/Figure5-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-2.png -------------------------------------------------------------------------------- /Chapter05/Figure5-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-20.png -------------------------------------------------------------------------------- /Chapter05/Figure5-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-21.png -------------------------------------------------------------------------------- /Chapter05/Figure5-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-22.png -------------------------------------------------------------------------------- /Chapter05/Figure5-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-3.png -------------------------------------------------------------------------------- /Chapter05/Figure5-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-4.png -------------------------------------------------------------------------------- /Chapter05/Figure5-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-5.png -------------------------------------------------------------------------------- /Chapter05/Figure5-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-6.png -------------------------------------------------------------------------------- /Chapter05/Figure5-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-7.png -------------------------------------------------------------------------------- /Chapter05/Figure5-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-8.png -------------------------------------------------------------------------------- /Chapter05/Figure5-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter05/Figure5-9.png -------------------------------------------------------------------------------- /Chapter05/PostGIS Installation on AWS.sql: -------------------------------------------------------------------------------- 1 | CREATE EXTENSION postgis; 2 | 3 | CREATE EXTENSION postgis_topology; 4 | 5 | CREATE EXTENSION fuzzystrmatch; 6 | 7 | CREATE EXTENSION postgis_tiger_geocoder; 8 | 9 | CREATE EXTENSION address_standardizer; 10 | 11 | SELECT name, default_version,installed_version 12 | FROM pg_available_extensions WHERE name LIKE 'postgis%' or name LIKE 'address%'; -------------------------------------------------------------------------------- /Chapter05/QGIS queries.sql: -------------------------------------------------------------------------------- 1 | CREATE VIEW "ATM coordinates" AS 2 | SELECT al.*, zc."geog" 3 | FROM "ATM locations" al 4 | INNER JOIN "Zip coordinates" zc 5 | ON al."ZipCode" = zc."zip"; 6 | 7 | SELECT atm."BankName", atm."Address" 8 | FROM "ATM coordinates" atm 9 | ORDER BY geog <-> ST_SetSRID(ST_MakePoint(-74.00365, 40.709677), 4326); 10 | 11 | SELECT atm."BankName", atm."Address" 12 | FROM "ATM coordinates" atm 13 | WHERE ST_DWithin(geog, ST_SetSRID(ST_MakePoint(-73.99337, 40.755101), 4326), 1000); 14 | 15 | -------------------------------------------------------------------------------- /Chapter05/zipcoordinates.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE public."Zip coordinates" 2 | ( 3 | zip integer NOT NULL, 4 | city character varying(64) COLLATE pg_catalog."default", 5 | state character(2) COLLATE pg_catalog."default", 6 | geog geography, 7 | CONSTRAINT "Zip coordinates_pkey" PRIMARY KEY (zip) 8 | ); 9 | 10 | INSERT INTO public."Zip coordinates"("zip","city","state","geog") 11 | VALUES(10001,'New York','NY','SRID=4326;POINT(-73.99653 40.750742)'), 12 | (10002,'New York','NY','SRID=4326;POINT(-73.987 40.71704)'), 13 | (10003,'New York','NY','SRID=4326;POINT(-73.98935 40.732509)'), 14 | (10005,'New York','NY','SRID=4326;POINT(-74.00858 40.706019)'), 15 | (10006,'New York','NY','SRID=4326;POINT(-74.01342 40.707904)'), 16 | (10007,'New York','NY','SRID=4326;POINT(-74.00721 40.714754)'), 17 | (10008,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 18 | (10009,'New York','NY','SRID=4326;POINT(-73.97864 40.727093)'), 19 | (10010,'New York','NY','SRID=4326;POINT(-73.98205 40.739022)'), 20 | (10011,'New York','NY','SRID=4326;POINT(-74.00012 40.741012)'), 21 | (10012,'New York','NY','SRID=4326;POINT(-73.99834 40.72596)'), 22 | (10013,'New York','NY','SRID=4326;POINT(-74.00526 40.720666)'), 23 | (10014,'New York','NY','SRID=4326;POINT(-74.00532 40.734718)'), 24 | (10015,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 25 | (10016,'New York','NY','SRID=4326;POINT(-73.97759 40.74618)'), 26 | (10017,'New York','NY','SRID=4326;POINT(-73.97231 40.752159)'), 27 | (10018,'New York','NY','SRID=4326;POINT(-73.99337 40.755101)'), 28 | (10019,'New York','NY','SRID=4326;POINT(-73.9856 40.765714)'), 29 | (10020,'New York','NY','SRID=4326;POINT(-73.98024 40.758667)'), 30 | (10021,'New York','NY','SRID=4326;POINT(-73.96045 40.76842)'), 31 | (10022,'New York','NY','SRID=4326;POINT(-73.96732 40.759015)'), 32 | (10023,'New York','NY','SRID=4326;POINT(-73.98285 40.776099)'), 33 | (10024,'New York','NY','SRID=4326;POINT(-73.97709 40.786387)'), 34 | (10025,'New York','NY','SRID=4326;POINT(-73.96811 40.798502)'), 35 | (10026,'New York','NY','SRID=4326;POINT(-73.95471 40.802853)'), 36 | (10027,'New York','NY','SRID=4326;POINT(-73.95499 40.812665)'), 37 | (10028,'New York','NY','SRID=4326;POINT(-73.9541 40.776777)'), 38 | (10029,'New York','NY','SRID=4326;POINT(-73.94575 40.791586)'), 39 | (10030,'New York','NY','SRID=4326;POINT(-73.94351 40.818151)'), 40 | (10031,'New York','NY','SRID=4326;POINT(-73.94879 40.826201)'), 41 | (10032,'New York','NY','SRID=4326;POINT(-73.94154 40.840686)'), 42 | (10033,'New York','NY','SRID=4326;POINT(-73.93496 40.848764)'), 43 | (10034,'New York','NY','SRID=4326;POINT(-73.92 40.867653)'), 44 | (10035,'New York','NY','SRID=4326;POINT(-73.93359 40.802395)'), 45 | (10036,'New York','NY','SRID=4326;POINT(-73.99019 40.759511)'), 46 | (10037,'New York','NY','SRID=4326;POINT(-73.93616 40.813385)'), 47 | (10038,'New York','NY','SRID=4326;POINT(-74.00365 40.709677)'), 48 | (10039,'New York','NY','SRID=4326;POINT(-73.9371 40.826181)'), 49 | (10040,'New York','NY','SRID=4326;POINT(-73.92853 40.858704)'), 50 | (10041,'New York','NY','SRID=4326;POINT(-74.01009 40.703042)'), 51 | (10043,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 52 | (10044,'New York','NY','SRID=4326;POINT(-73.94917 40.762174)'), 53 | (10045,'New York','NY','SRID=4326;POINT(-74.008687 40.70859)'), 54 | (10046,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 55 | (10047,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 56 | (10048,'New York','NY','SRID=4326;POINT(-74.01227 40.712086)'), 57 | (10055,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 58 | (10060,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 59 | (10069,'New York','NY','SRID=4326;POINT(-73.9905 40.775477)'), 60 | (10072,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 61 | (10079,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 62 | (10080,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 63 | (10081,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 64 | (10082,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 65 | (10087,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 66 | (10090,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 67 | (10094,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 68 | (10095,'New York','NY','SRID=4326;POINT(-73.988421 40.748181)'), 69 | (10096,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 70 | (10098,'New York','NY','SRID=4326;POINT(-73.988421 40.748181)'), 71 | (10099,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 72 | (10101,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 73 | (10102,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 74 | (10103,'New York','NY','SRID=4326;POINT(-73.97785 40.760915)'), 75 | (10104,'New York','NY','SRID=4326;POINT(-73.979908 40.760943)'), 76 | (10105,'New York','NY','SRID=4326;POINT(-73.978534 40.762808)'), 77 | (10106,'New York','NY','SRID=4326;POINT(-73.980438 40.765243)'), 78 | (10107,'New York','NY','SRID=4326;POINT(-73.982728 40.766429)'), 79 | (10108,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 80 | (10109,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 81 | (10110,'New York','NY','SRID=4326;POINT(-73.980811 40.753987)'), 82 | (10111,'New York','NY','SRID=4326;POINT(-73.97775 40.759235)'), 83 | (10112,'New York','NY','SRID=4326;POINT(-73.97979 40.759291)'), 84 | (10113,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 85 | (10114,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 86 | (10115,'New York','NY','SRID=4326;POINT(-73.96375 40.810906)'), 87 | (10116,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 88 | (10117,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 89 | (10118,'New York','NY','SRID=4326;POINT(-73.986467 40.748998)'), 90 | (10119,'New York','NY','SRID=4326;POINT(-73.99289 40.750824)'), 91 | (10120,'New York','NY','SRID=4326;POINT(-73.989426 40.750629)'), 92 | (10121,'New York','NY','SRID=4326;POINT(-73.991889 40.74964)'), 93 | (10122,'New York','NY','SRID=4326;POINT(-73.992171 40.751757)'), 94 | (10123,'New York','NY','SRID=4326;POINT(-73.990537 40.751489)'), 95 | (10124,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 96 | (10125,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 97 | (10126,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 98 | (10128,'New York','NY','SRID=4326;POINT(-73.95039 40.781894)'), 99 | (10129,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 100 | (10130,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 101 | (10131,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 102 | (10132,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 103 | (10133,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 104 | (10138,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 105 | (10149,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 106 | (10150,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 107 | (10151,'New York','NY','SRID=4326;POINT(-73.973971 40.763419)'), 108 | (10152,'New York','NY','SRID=4326;POINT(-73.97223 40.758611)'), 109 | (10153,'New York','NY','SRID=4326;POINT(-73.97268 40.763742)'), 110 | (10154,'New York','NY','SRID=4326;POINT(-73.97267 40.757986)'), 111 | (10155,'New York','NY','SRID=4326;POINT(-73.968036 40.761104)'), 112 | (10156,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 113 | (10157,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 114 | (10158,'New York','NY','SRID=4326;POINT(-73.9758 40.749435)'), 115 | (10159,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 116 | (10160,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 117 | (10161,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 118 | (10162,'New York','NY','SRID=4326;POINT(-73.94893 40.769334)'), 119 | (10163,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 120 | (10164,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 121 | (10165,'New York','NY','SRID=4326;POINT(-73.9789 40.752354)'), 122 | (10166,'New York','NY','SRID=4326;POINT(-73.976238 40.754591)'), 123 | (10167,'New York','NY','SRID=4326;POINT(-73.97495 40.754862)'), 124 | (10168,'New York','NY','SRID=4326;POINT(-73.976794 40.751933)'), 125 | (10169,'New York','NY','SRID=4326;POINT(-73.97606 40.754463)'), 126 | (10170,'New York','NY','SRID=4326;POINT(-73.97608 40.752859)'), 127 | (10171,'New York','NY','SRID=4326;POINT(-73.97401 40.756099)'), 128 | (10172,'New York','NY','SRID=4326;POINT(-73.97447 40.755494)'), 129 | (10173,'New York','NY','SRID=4326;POINT(-73.97955 40.754302)'), 130 | (10174,'New York','NY','SRID=4326;POINT(-73.97516 40.751656)'), 131 | (10175,'New York','NY','SRID=4326;POINT(-73.979782 40.754305)'), 132 | (10176,'New York','NY','SRID=4326;POINT(-73.978877 40.75557)'), 133 | (10177,'New York','NY','SRID=4326;POINT(-73.97609 40.755345)'), 134 | (10178,'New York','NY','SRID=4326;POINT(-73.978507 40.751378)'), 135 | (10179,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 136 | (10184,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 137 | (10185,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 138 | (10196,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 139 | (10197,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 140 | (10199,'New York','NY','SRID=4326;POINT(-74.00058 40.750308)'), 141 | (10203,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 142 | (10211,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 143 | (10212,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 144 | (10213,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 145 | (10242,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 146 | (10249,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 147 | (10250,'New York','NY','SRID=4326;POINT(-74.016529 40.709387)'), 148 | (10256,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 149 | (10257,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 150 | (10258,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 151 | (10259,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 152 | (10260,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 153 | (10261,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 154 | (10265,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 155 | (10268,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 156 | (10269,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 157 | (10270,'New York','NY','SRID=4326;POINT(-74.008154 40.706925)'), 158 | (10271,'New York','NY','SRID=4326;POINT(-74.01043 40.708669)'), 159 | (10272,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 160 | (10273,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 161 | (10274,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 162 | (10275,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 163 | (10276,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 164 | (10277,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 165 | (10278,'New York','NY','SRID=4326;POINT(-74.00395 40.715721)'), 166 | (10279,'New York','NY','SRID=4326;POINT(-74.00857 40.713062)'), 167 | (10280,'New York','NY','SRID=4326;POINT(-74.0178 40.707467)'), 168 | (10281,'New York','NY','SRID=4326;POINT(-74.014958 40.714643)'), 169 | (10282,'New York','NY','SRID=4326;POINT(-74.01433 40.717179)'), 170 | (10285,'New York','NY','SRID=4326;POINT(-74.016306 40.71533)'), 171 | (10286,'New York','NY','SRID=4326;POINT(-74.011895 40.714231)'), 172 | (10292,'New York','NY','SRID=4326;POINT(-73.977182 40.780751)'), 173 | (10422,'New York','NY','SRID=4326;POINT(-73.869454 40.828279)'), 174 | (11286,'New York','NY','SRID=4326;POINT(-74.004495 40.658825)'), 175 | (11302,'New York','NY','SRID=4326;POINT(-73.715016 40.75945)'), 176 | (11517,'New York','NY','SRID=4326;POINT(-73.986415 40.679845)'); 177 | -------------------------------------------------------------------------------- /Chapter06/Currencies.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO "Currencies" (currencycode, currencyname) 2 | VALUES ('USD', 'United States Dollar'), 3 | ('CAD', 'Canadian Dollar'), 4 | ('GBP', 'British Pound Sterling'), 5 | ('EUR', 'Euro (European Monetary Unit)'); -------------------------------------------------------------------------------- /Chapter06/FX-Schema.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "Currencies" 2 | ( 3 | currencycode character varying(3) PRIMARY KEY, 4 | currencyname text 5 | ); 6 | 7 | CREATE TABLE "ExchangeRates" 8 | ( 9 | "time" timestamp with time zone NOT NULL, 10 | openingrate double precision, 11 | highestrate double precision, 12 | lowestrate double precision, 13 | closingrate double precision, 14 | currencycode character varying(3) REFERENCES public."Currencies" (currencycode) ON DELETE CASCADE, 15 | PRIMARY KEY ("time", currencycode) 16 | ); 17 | -------------------------------------------------------------------------------- /Chapter06/Figure6-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-1.png -------------------------------------------------------------------------------- /Chapter06/Figure6-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-10.png -------------------------------------------------------------------------------- /Chapter06/Figure6-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-11.png -------------------------------------------------------------------------------- /Chapter06/Figure6-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-12.png -------------------------------------------------------------------------------- /Chapter06/Figure6-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-13.png -------------------------------------------------------------------------------- /Chapter06/Figure6-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-14.png -------------------------------------------------------------------------------- /Chapter06/Figure6-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-15.png -------------------------------------------------------------------------------- /Chapter06/Figure6-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-16.png -------------------------------------------------------------------------------- /Chapter06/Figure6-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-17.png -------------------------------------------------------------------------------- /Chapter06/Figure6-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-18.png -------------------------------------------------------------------------------- /Chapter06/Figure6-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-19.png -------------------------------------------------------------------------------- /Chapter06/Figure6-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-2.png -------------------------------------------------------------------------------- /Chapter06/Figure6-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-20.png -------------------------------------------------------------------------------- /Chapter06/Figure6-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-21.png -------------------------------------------------------------------------------- /Chapter06/Figure6-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-22.png -------------------------------------------------------------------------------- /Chapter06/Figure6-23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-23.png -------------------------------------------------------------------------------- /Chapter06/Figure6-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-24.png -------------------------------------------------------------------------------- /Chapter06/Figure6-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-25.png -------------------------------------------------------------------------------- /Chapter06/Figure6-26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-26.png -------------------------------------------------------------------------------- /Chapter06/Figure6-27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-27.png -------------------------------------------------------------------------------- /Chapter06/Figure6-28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-28.png -------------------------------------------------------------------------------- /Chapter06/Figure6-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-29.png -------------------------------------------------------------------------------- /Chapter06/Figure6-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-3.png -------------------------------------------------------------------------------- /Chapter06/Figure6-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-30.png -------------------------------------------------------------------------------- /Chapter06/Figure6-31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-31.png -------------------------------------------------------------------------------- /Chapter06/Figure6-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-32.png -------------------------------------------------------------------------------- /Chapter06/Figure6-33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-33.png -------------------------------------------------------------------------------- /Chapter06/Figure6-34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-34.png -------------------------------------------------------------------------------- /Chapter06/Figure6-35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-35.png -------------------------------------------------------------------------------- /Chapter06/Figure6-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-36.png -------------------------------------------------------------------------------- /Chapter06/Figure6-37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-37.png -------------------------------------------------------------------------------- /Chapter06/Figure6-38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-38.png -------------------------------------------------------------------------------- /Chapter06/Figure6-39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-39.png -------------------------------------------------------------------------------- /Chapter06/Figure6-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-4.png -------------------------------------------------------------------------------- /Chapter06/Figure6-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-40.png -------------------------------------------------------------------------------- /Chapter06/Figure6-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-41.png -------------------------------------------------------------------------------- /Chapter06/Figure6-42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-42.png -------------------------------------------------------------------------------- /Chapter06/Figure6-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-5.png -------------------------------------------------------------------------------- /Chapter06/Figure6-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-6.png -------------------------------------------------------------------------------- /Chapter06/Figure6-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-7.png -------------------------------------------------------------------------------- /Chapter06/Figure6-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-8.png -------------------------------------------------------------------------------- /Chapter06/Figure6-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter06/Figure6-9.png -------------------------------------------------------------------------------- /Chapter06/Script 1 - Docker.sh: -------------------------------------------------------------------------------- 1 | [centos@ip-172-31-95-213 ~]$ sudo su 2 | [root@ip-172-31-95-213 centos]# cd /usr/local/src/ 3 | [root@ip-172-31-95-213 src]# yum install -y yum-utils device-mapper-persistent-data lvm2 4 | [root@ip-172-31-95-213 src]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo 5 | [root@ip-172-31-95-213 src]# yum install docker-ce 6 | [root@ip-172-31-95-213 src]# usermod -aG docker $(whoami) 7 | [root@ip-172-31-95-213 src]# systemctl enable docker.service 8 | [root@ip-172-31-95-213 src]# systemctl start docker.service 9 | [root@ip-172-31-95-213 src]# docker run --name tutorial -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres 10 | [root@ip-172-31-95-213 src]# docker exec -it tutorial psql -U postgres 11 | -------------------------------------------------------------------------------- /Chapter06/Script 10 - Expiration token.sh: -------------------------------------------------------------------------------- 1 | [centos@ip-172-31-95-213 ~]$ export TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYXRtX3VzZXIiLCJleHAiOjE1NjY4ODA0OTJ9.Imw7-Mbxejo9SCL0FGfAG0lR166fZ6ujhpEIlqvvlig" 2 | [centos@ip-172-31-95-213 ~]$ curl http://localhost:3000/ATM%20locations -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"BankName":"Test Bank 2","Address":"100 Test way","County":"New York","City":"New York","State":"NY","ZipCode":10272}' 3 | -------------------------------------------------------------------------------- /Chapter06/Script 11 - User revocation.sql: -------------------------------------------------------------------------------- 1 | create schema auth; 2 | grant usage on schema auth to web_anon, atm_user; 3 | 4 | create or replace function auth.check_token() returns void 5 | language plpgsql 6 | as $$ 7 | begin 8 | if current_setting('request.jwt.claim.email', true) = 'not.good@mypostgrest.com' then 9 | raise insufficient_privilege using hint = 'Nope, we are on to you'; 10 | end if; 11 | end $$; 12 | -------------------------------------------------------------------------------- /Chapter06/Script 12 - Revocation token.sh: -------------------------------------------------------------------------------- 1 | [centos@ip-172-31-95-213 ~]$ export BADTOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYXRtX3VzZXIiLCJlbWFpbCI6Im5vdC5nb29kQG15cG9zdGdyZXN0LmNvbSJ9.Alz9Wm7oQ4igcZA9mr-OjgwPJ_d3PisvmKAnb29xLMQ" 2 | 3 | [centos@ip-172-31-95-213 ~]$ curl http://localhost:3000/ATM%20locations -X POST -H "Authorization: Bearer $BADTOKEN" -H "Content-Type: application/json" -d '{"BankName":"Test Bank 2","Address":"100 Test way","County":"New York","City":"New York","State":"NY","ZipCode":10272}' 4 | 5 | -------------------------------------------------------------------------------- /Chapter06/Script 13 - PostgREST as a service.sh: -------------------------------------------------------------------------------- 1 | [root@ip-172-31-95-213 postgrest]# mkdir /etc/postgrest 2 | [root@ip-172-31-95-213 postgrest]# vi /etc/postgrest/config 3 | ------------------------------------------ 4 | db-uri = "postgres://dba:bookdemo@atm.c3qdepivtce8.us-east-1.rds.amazonaws.com/atm" 5 | db-schema = "public" 6 | db-anon-role = "web_anon" 7 | db-pool = 10 8 | 9 | server-host = "127.0.0.1" 10 | server-port = 3000 11 | 12 | jwt-secret = "DFZ49GQGubpzcSbt3t2uMIiBF6pU4PJ8" 13 | ------------------------------------------ 14 | 15 | [root@ip-172-31-95-213 postgrest]# ln -s /usr/local/bin/postgrest /bin/postgrest 16 | [root@ip-172-31-95-213 postgrest]# vi /etc/systemd/system/postgrest.service 17 | ------------------------------------------ 18 | [Unit] 19 | Description=REST API for any Postgres database 20 | After=postgresql.service 21 | 22 | [Service] 23 | ExecStart=/bin/postgrest /etc/postgrest/config 24 | ExecReload=/bin/kill -SIGUSR1 $MAINPID 25 | 26 | [Install] 27 | WantedBy=multi-user.target 28 | ------------------------------------------ 29 | 30 | [root@ip-172-31-95-213 postgrest]# systemctl enable postgrest 31 | [root@ip-172-31-95-213 postgrest]# systemctl start postgrest 32 | -------------------------------------------------------------------------------- /Chapter06/Script 2 - PostgREST binary release.sh: -------------------------------------------------------------------------------- 1 | [root@ip-172-31-95-213 src]# yum install postgresql-libs 2 | [root@ip-172-31-95-213 src]# wget https://github.com/PostgREST/postgrest/releases/download/v6.0.1/postgrest-v6.0.1-centos7.tar.xz 3 | [root@ip-172-31-95-213 src]# tar xfJ postgrest-v6.0.1-centos7.tar.xz 4 | [root@ip-172-31-95-213 src]# mv postgrest /usr/local/bin/ 5 | [root@ip-172-31-95-213 src]# rm postgrest-v6.0.1-centos7.tar.xz 6 | -------------------------------------------------------------------------------- /Chapter06/Script 3 - User Role.sql: -------------------------------------------------------------------------------- 1 | create role web_anon nologin; 2 | grant web_anon to dba; 3 | 4 | grant usage on schema public to web_anon; 5 | grant select on public."ATM locations" to web_anon; 6 | -------------------------------------------------------------------------------- /Chapter06/Script 4 - Configuration file.sh: -------------------------------------------------------------------------------- 1 | [root@ip-172-31-95-213 src]# mkdir postgrest 2 | [root@ip-172-31-95-213 src]# cd postgrest 3 | [root@ip-172-31-95-213 postgrest]# vi tutorial.conf 4 | ------------------------------------------ 5 | db-uri = "postgres://dba:bookdemo@atm.ck5074bwbilj.us-east-1.rds.amazonaws.com/atm" 6 | db-schema = "public" 7 | db-anon-role = "web_anon" 8 | ------------------------------------------ 9 | [root@ip-172-31-95-213 postgrest]# postgrest tutorial.conf 10 | -------------------------------------------------------------------------------- /Chapter06/Script 5 - Basic API.sh: -------------------------------------------------------------------------------- 1 | [root@ip-172-31-95-213 centos]# curl http://localhost:3000/ATM%20locations 2 | [root@ip-172-31-95-213 centos]# curl http://localhost:3000/ATM%20locations -X POST -H "Content-Type: application/json" -d '{"BankName":"Test Bank","Address":"99 Test way","County":"New York","City":"New York","State":"NY","ZipCode":10271}' 3 | -------------------------------------------------------------------------------- /Chapter06/Script 6 - Add a Trusted User.sql: -------------------------------------------------------------------------------- 1 | create role atm_user nologin; 2 | grant atm_user to dba; 3 | 4 | grant usage on schema public to atm_user; 5 | grant all on public."ATM locations" to atm_user; 6 | grant usage, select on sequence public."ATM locations_ID_seq" to atm_user; 7 | -------------------------------------------------------------------------------- /Chapter06/Script 7 - Make a Secret.sh: -------------------------------------------------------------------------------- 1 | [root@ip-172-31-95-213 postgrest]# export LC_CTYPE=C 2 | [root@ip-172-31-95-213 postgrest]# < /dev/urandom tr -dc A-Za-z0-9 | head -c32 3 | DFZ49GQGubpzcSbt3t2uMIiBF6pU4PJ8 4 | 5 | -------------------------------------------------------------------------------- /Chapter06/Script 8 - Successful insertion.sh: -------------------------------------------------------------------------------- 1 | [centos@ip-172-31-95-213 ~]$ export TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYXRtX3VzZXIifQ.ZL8hsLj5cewZvgb81EXm5vC3Jpn_4TzpszwMBStu-xo" 2 | [centos@ip-172-31-95-213 ~]$ curl http://localhost:3000/ATM%20locations -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"BankName":"Test Bank","Address":"99 Test way","County":"New York","City":"New York","State":"NY","ZipCode":10271}' 3 | -------------------------------------------------------------------------------- /Chapter06/Script 9 - Expiration epoch.sql: -------------------------------------------------------------------------------- 1 | select extract(epoch from now() + '5 minutes'::interval) :: integer; 2 | So this epoch value = 1566880492. 3 | -------------------------------------------------------------------------------- /Chapter07/Figure7-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-1.png -------------------------------------------------------------------------------- /Chapter07/Figure7-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-10.png -------------------------------------------------------------------------------- /Chapter07/Figure7-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-11.png -------------------------------------------------------------------------------- /Chapter07/Figure7-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-12.png -------------------------------------------------------------------------------- /Chapter07/Figure7-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-13.png -------------------------------------------------------------------------------- /Chapter07/Figure7-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-14.png -------------------------------------------------------------------------------- /Chapter07/Figure7-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-15.png -------------------------------------------------------------------------------- /Chapter07/Figure7-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-16.png -------------------------------------------------------------------------------- /Chapter07/Figure7-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-17.png -------------------------------------------------------------------------------- /Chapter07/Figure7-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-18.png -------------------------------------------------------------------------------- /Chapter07/Figure7-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-19.png -------------------------------------------------------------------------------- /Chapter07/Figure7-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-2.png -------------------------------------------------------------------------------- /Chapter07/Figure7-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-20.png -------------------------------------------------------------------------------- /Chapter07/Figure7-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-21.png -------------------------------------------------------------------------------- /Chapter07/Figure7-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-22.png -------------------------------------------------------------------------------- /Chapter07/Figure7-23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-23.png -------------------------------------------------------------------------------- /Chapter07/Figure7-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-24.png -------------------------------------------------------------------------------- /Chapter07/Figure7-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-25.png -------------------------------------------------------------------------------- /Chapter07/Figure7-26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-26.png -------------------------------------------------------------------------------- /Chapter07/Figure7-27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-27.png -------------------------------------------------------------------------------- /Chapter07/Figure7-28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-28.png -------------------------------------------------------------------------------- /Chapter07/Figure7-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-29.png -------------------------------------------------------------------------------- /Chapter07/Figure7-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-3.png -------------------------------------------------------------------------------- /Chapter07/Figure7-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-30.png -------------------------------------------------------------------------------- /Chapter07/Figure7-31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-31.png -------------------------------------------------------------------------------- /Chapter07/Figure7-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-32.png -------------------------------------------------------------------------------- /Chapter07/Figure7-33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-33.png -------------------------------------------------------------------------------- /Chapter07/Figure7-34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-34.png -------------------------------------------------------------------------------- /Chapter07/Figure7-35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-35.png -------------------------------------------------------------------------------- /Chapter07/Figure7-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-36.png -------------------------------------------------------------------------------- /Chapter07/Figure7-37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-37.png -------------------------------------------------------------------------------- /Chapter07/Figure7-38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-38.png -------------------------------------------------------------------------------- /Chapter07/Figure7-39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-39.png -------------------------------------------------------------------------------- /Chapter07/Figure7-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-4.png -------------------------------------------------------------------------------- /Chapter07/Figure7-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-40.png -------------------------------------------------------------------------------- /Chapter07/Figure7-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-41.png -------------------------------------------------------------------------------- /Chapter07/Figure7-42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-42.png -------------------------------------------------------------------------------- /Chapter07/Figure7-43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-43.png -------------------------------------------------------------------------------- /Chapter07/Figure7-44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-44.png -------------------------------------------------------------------------------- /Chapter07/Figure7-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-5.png -------------------------------------------------------------------------------- /Chapter07/Figure7-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-6.png -------------------------------------------------------------------------------- /Chapter07/Figure7-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-7.png -------------------------------------------------------------------------------- /Chapter07/Figure7-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-8.png -------------------------------------------------------------------------------- /Chapter07/Figure7-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter07/Figure7-9.png -------------------------------------------------------------------------------- /Chapter07/main.tf: -------------------------------------------------------------------------------- 1 | provider "postgresql" { 2 | host = "192.168.0.191" 3 | port = 5432 4 | username = "postgres" 5 | sslmode = "require" 6 | connect_timeout = 15 7 | } 8 | resource "postgresql_role" "terraform_role" { 9 | name = "terraform_role" 10 | login = true 11 | password = "tfdemo" 12 | } 13 | resource "postgresql_role" "terraform_dba" { 14 | name = "terraform_dba" 15 | login = true 16 | password = "tfdba" 17 | } 18 | resource "postgresql_database" "terraform_db" { 19 | name = "terraform_db" 20 | owner = "terraform_dba" 21 | lc_collate = "C" 22 | connection_limit = -1 23 | allow_connections = true 24 | } 25 | resource "postgresql_schema" "terraform_schema" { 26 | name = "terraform_schema" 27 | owner = "postgres" 28 | database = postgresql_database.terraform_db.name 29 | # terraform_role can create new objects in the schema. This is the role that 30 | # migrations are executed as. 31 | policy { 32 | create = true 33 | usage = true 34 | role = postgresql_role.terraform_role.name 35 | } 36 | policy { 37 | create_with_grant = true 38 | usage_with_grant = true 39 | role = postgresql_role.terraform_dba.name 40 | } 41 | } -------------------------------------------------------------------------------- /Chapter07/postgresdata.yml: -------------------------------------------------------------------------------- 1 | - name: PostgreSQL Data Playbook 2 | hosts: postgres 3 | become: yes 4 | tasks: 5 | - name: install prerequisites 6 | apt: name={{ item }} update_cache=yes state=present 7 | with_items: 8 | - python-psycopg2 9 | - python-ipaddress 10 | - name: Grant user postgres md5 11 | postgresql_pg_hba: 12 | dest: /etc/postgresql/12/main/pg_hba.conf 13 | contype: local 14 | users: postgres 15 | databases: atm 16 | method: trust 17 | create: true 18 | - name: Stop service postgresql, if running 19 | service: 20 | name: postgresql 21 | state: stopped 22 | - name: Start service postgresql, if not running 23 | service: 24 | name: postgresql 25 | state: started 26 | - name: download atm table definition 27 | get_url: 28 | url=https://github.com/lequanha/PostgreSQL-12-Development-and-Administration-Projects/blob/master/Chapter%202/atmdefs.sql?raw=true 29 | dest=/tmp/atmdefs.sql 30 | - name: Run queries from atm definition SQL script 31 | postgresql_query: 32 | db: atm 33 | path_to_script: /tmp/atmdefs.sql 34 | positional_args: 35 | - 1 36 | - name: download atm table data insertions 37 | get_url: 38 | url=https://github.com/lequanha/PostgreSQL-12-Development-and-Administration-Projects/blob/master/Chapter%202/atmlocations.sql?raw=true 39 | dest=/tmp/atmlocations.sql 40 | - name: Run queries from atm data SQL script 41 | postgresql_query: 42 | db: atm 43 | path_to_script: /tmp/atmlocations.sql 44 | positional_args: 45 | - 1 -------------------------------------------------------------------------------- /Chapter09/Figure9-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-1.png -------------------------------------------------------------------------------- /Chapter09/Figure9-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-10.png -------------------------------------------------------------------------------- /Chapter09/Figure9-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-11.png -------------------------------------------------------------------------------- /Chapter09/Figure9-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-12.png -------------------------------------------------------------------------------- /Chapter09/Figure9-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-13.png -------------------------------------------------------------------------------- /Chapter09/Figure9-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-14.png -------------------------------------------------------------------------------- /Chapter09/Figure9-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-15.png -------------------------------------------------------------------------------- /Chapter09/Figure9-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-16.png -------------------------------------------------------------------------------- /Chapter09/Figure9-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-17.png -------------------------------------------------------------------------------- /Chapter09/Figure9-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-18.png -------------------------------------------------------------------------------- /Chapter09/Figure9-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-19.png -------------------------------------------------------------------------------- /Chapter09/Figure9-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-2.png -------------------------------------------------------------------------------- /Chapter09/Figure9-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-20.png -------------------------------------------------------------------------------- /Chapter09/Figure9-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-21.png -------------------------------------------------------------------------------- /Chapter09/Figure9-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-22.png -------------------------------------------------------------------------------- /Chapter09/Figure9-23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-23.png -------------------------------------------------------------------------------- /Chapter09/Figure9-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-24.png -------------------------------------------------------------------------------- /Chapter09/Figure9-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-25.png -------------------------------------------------------------------------------- /Chapter09/Figure9-26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-26.png -------------------------------------------------------------------------------- /Chapter09/Figure9-27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-27.png -------------------------------------------------------------------------------- /Chapter09/Figure9-28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-28.png -------------------------------------------------------------------------------- /Chapter09/Figure9-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-29.png -------------------------------------------------------------------------------- /Chapter09/Figure9-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-3.png -------------------------------------------------------------------------------- /Chapter09/Figure9-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-30.png -------------------------------------------------------------------------------- /Chapter09/Figure9-31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-31.png -------------------------------------------------------------------------------- /Chapter09/Figure9-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-32.png -------------------------------------------------------------------------------- /Chapter09/Figure9-33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-33.png -------------------------------------------------------------------------------- /Chapter09/Figure9-34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-34.png -------------------------------------------------------------------------------- /Chapter09/Figure9-35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-35.png -------------------------------------------------------------------------------- /Chapter09/Figure9-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-36.png -------------------------------------------------------------------------------- /Chapter09/Figure9-37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-37.png -------------------------------------------------------------------------------- /Chapter09/Figure9-38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-38.png -------------------------------------------------------------------------------- /Chapter09/Figure9-39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-39.png -------------------------------------------------------------------------------- /Chapter09/Figure9-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-4.png -------------------------------------------------------------------------------- /Chapter09/Figure9-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-40.png -------------------------------------------------------------------------------- /Chapter09/Figure9-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-5.png -------------------------------------------------------------------------------- /Chapter09/Figure9-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-6.png -------------------------------------------------------------------------------- /Chapter09/Figure9-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-7.png -------------------------------------------------------------------------------- /Chapter09/Figure9-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-8.png -------------------------------------------------------------------------------- /Chapter09/Figure9-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Developing-Modern-Database-Applications-with-PostgreSQL/d066a991297eca30fa96a2ccfb386e31938e10e2/Chapter09/Figure9-9.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Developing Modern Database Applications with PostgreSQL 2 | 3 | Developing Modern Database Applications with PostgreSQL 4 | 5 | This is the code repository for [Developing Modern Database Applications with PostgreSQL](https://www.packtpub.com/product/developing-modern-database-applications-with-postgresql/9781838648145), published by Packt. 6 | 7 | **Use the highly available and object-relational PostgreSQL to build scalable and reliable apps** 8 | 9 | ## What is this book about? 10 | PostgreSQL is an open-source object-relational database management system (DBMS) that provides enterprise-level services, including high performance and scalability. This book is a collection of unique projects providing you with a wealth of information relating to administering, monitoring, and testing PostgreSQL. The focus of each project is on both the development and the administrative aspects of PostgreSQL. 11 | 12 | This book covers the following exciting features: 13 | * Set up high availability PostgreSQL database clusters in the same containment, a cross-containment, and on the cloud 14 | * Monitor the performance of a PostgreSQL database 15 | * Create automated unit tests and implement test-driven development for a PostgreSQL database 16 | * Develop PostgreSQL apps on cloud platforms using DevOps with Python and Node.js 17 | * Write robust APIs for PostgreSQL databases using Python programming, Node.js, and PostgREST 18 | 19 | If you feel this book is for you, get your [copy](https://www.amazon.com/dp/1838648143) today! 20 | 21 | https://www.packtpub.com/ 23 | 24 | 25 | ## Instructions and Navigations 26 | All of the code is organized into folders. For example, Chapter02. 27 | 28 | The code will look like the following: 29 | ``` 30 | // add query functions 31 | module.exports = { 32 | getAllATMLocations: getAllATMLocations, 33 | getSingleATMLocation: getSingleATMLocation, 34 | createATMLocation: createATMLocation, 35 | updateATMLocation: updateATMLocation, 36 | removeATMLocation: removeATMLocation 37 | }; 38 | ``` 39 | 40 | **Following is what you need for this book:** 41 | This PostgreSQL book is for database developers, database administrators, data architects, or anyone who wants to build end-to-end database projects using Postgres. This book will also appeal to software engineers, IT technicians, computer science researchers, and university students who are interested in database development and administration. Some familiarity with PostgreSQL and Linux is required to grasp the concepts covered in the book effectively. 42 | 43 | With the following software and hardware list you can run all code files present in the book (Chapter 1-12). 44 | 45 | ### Software and Hardware List 46 | 47 | | Chapter | Software required | OS required | 48 | | -------- | ------------------------------------| -----------------------------------| 49 | | 1 |PostgreSQL 11 and above | Windows, Mac OS X, and Linux (Any) | 50 | 51 | 52 | We also provide a PDF file that has color images of the screenshots/diagrams used in this book. [Click here to download it](https://static.packt-cdn.com/downloads/9781838648145_ColorImages.pdf). 53 | 54 | ### Related products 55 | * Learn PostgreSQL [[Packt]](https://www.packtpub.com/product/learn-postgresql/9781838985288) [[Amazon]](https://www.amazon.com/dp/183898528X) 56 | 57 | * PostgreSQL 13 Cookbook [[Packt]](https://www.packtpub.com/product/postgresql-13-cookbook/9781838648138) [[Amazon]](https://www.amazon.com/dp/1838648135) 58 | 59 | ## Get to Know the Authors 60 | **Dr. Quan Ha Le** 61 | graduated with a Ph.D. in computer science from the Queen's University of Belfast, United Kingdom, in 2005. Since his Ph.D. graduation, he has been working as a PostgreSQL database administrator all over Alberta and Ontario, Canada, until now. 62 | From 2008 to 2019, Dr. Le Quan Ha administered, designed, and developed 24 small, medium, large, and huge PostgreSQL databases in Canada. Since 2016, after writing a good publication on PostgreSQL database clusters on clouds, he has been a member of the United States PostgreSQL Association (PgUS) in New York City. Dr. Le Quan Ha has also been a board member of the PgUS Diversity committee since 2018. 63 | 64 | 65 | **Marcelo Diaz** 66 | is a software engineer with more than 15 years of experience, with a special focus on PostgreSQL. He is passionate about open source software and has promoted its application in critical and high-demand environments where he has worked as a software developer and consultant for both private and public companies. He currently works very happily at Cybertec and as a technical reviewer for Packt Publishing. He enjoys spending his leisure time with his daughter, Malvina, and his wife, Romina. He also likes playing football. 67 | 68 | --------------------------------------------------------------------------------