diff --git a/app.js b/app.js
index bd00424..6557b71 100644
--- a/app.js
+++ b/app.js
@@ -1 +1,73 @@
-//your code here
+const sqlite3 = require('sqlite3').verbose();
+const db = new sqlite3.Database('./db/movie.db');
+
+const express = require('express');
+const app = express();
+const bodyParser = require('body-parser');
+
+const movies = require('./models/movies')
+const prod = require('./models/prodHouses')
+
+app.use(bodyParser.urlencoded({extended: false}));
+app.use(bodyParser.json());
+
+app.set('view engine', 'ejs');
+
+app.get('/movies', function(req,res) {
+ let query = `SELECT M.*, P.name_prodHouse
+ FROM Movies AS M
+ LEFT JOIN ProductionHouses AS P
+ ON P.id = M.prodHouseId`
+
+ db.all(query, function(err,rowsMovie) {
+ if(!err) {
+ res.render('movie', {dataMovie: rowsMovie});
+ } else {
+ res.send(err)
+ }
+ })
+})
+
+app.get('/movies/edit/:id', function(req,res) {
+ let query = `SELECT * FROM Movies WHERE id = ${req.params.id}`;
+ let queryProdHouse = `SELECT * FROM ProductionHouses`
+
+ db.all(query, function(errMovies,movie) {
+ if(!errMovies) {
+ if(movie.length > 0) {
+ db.all(queryProdHouse, function(errProdHouse,rowsProdHouse) {
+ if(!errProdHouse) {
+ res.render('editMovie', {movie: movie[0], dataProdHouse: rowsProdHouse})
+ } else {
+ res.send(errProdHouse)
+ }
+ })
+ }
+ } else {
+ res.send(errMovies)
+ }
+ })
+})
+
+app.post('/movies/edit/:id', function(req,res) {
+ movies.update(req.body, req.params.id, function(err)) {
+ res.redirect('/movies');
+ } else {
+ res.send(err)
+ }
+ })
+})
+
+app.get('/prodHouses', function(req,res){
+ prod.findAll(function(err,rowsProdHouse) {
+ if(!err) {
+ res.render('prodHouse', {dataProdHouse: rowsProdHouse});
+ } else {
+ res.send(err)
+ }
+ })
+})
+
+app.listen(3000, function() {
+ console.log(`Are you looking for me? 3000`);
+})
diff --git a/db/movie.db b/db/movie.db
new file mode 100644
index 0000000..15defe7
Binary files /dev/null and b/db/movie.db differ
diff --git a/models/movies.js b/models/movies.js
new file mode 100644
index 0000000..ed6f523
--- /dev/null
+++ b/models/movies.js
@@ -0,0 +1,40 @@
+const sqlite3 = require('sqlite3').verbose();
+const db = new sqlite3.Database('./db/movie.db');
+
+class Movies {
+
+ findAllWithProd(cb){
+ let query = `SELECT M.*, P.name_prodHouse
+ FROM Movies AS M
+ LEFT JOIN ProductionHouses AS P
+ ON P.id = M.prodHouseId`
+
+ db.all(query, function(err,cb()){
+
+ }
+ }
+
+ findID (){
+
+ }
+
+
+ update(body,params,cb){
+ let query = `UPDATE Movies
+ SET name = '${body.movie}',
+ released_year = '${body.released_year}',
+ genre = '${body.genre}',
+ prodHouseId = ${body.prodHouseId}
+ WHERE id = ${params}`
+ db.run(query, function(err){
+ if(!err) {
+ cb()
+ } else {
+
+ }
+ }
+ }
+
+}
+
+module.exports = Movies
\ No newline at end of file
diff --git a/models/prodHouses.js b/models/prodHouses.js
new file mode 100644
index 0000000..05479d3
--- /dev/null
+++ b/models/prodHouses.js
@@ -0,0 +1,16 @@
+const sqlite3 = require('sqlite3').verbose();
+const db = new sqlite3.Database('./db/movie.db');
+
+class ProdHouses {
+
+ findAll (cb){
+ let query = `SELECT * FROM ProductionHouses`
+
+ db.all(query, cb()){
+
+ }
+ }
+
+}
+
+module.exports = ProdHouses
\ No newline at end of file
diff --git a/people.csv b/people.csv
new file mode 100644
index 0000000..6605531
--- /dev/null
+++ b/people.csv
@@ -0,0 +1,202 @@
+id,first_name,last_name,email,phone,created_at
+1,Lani,Rollins,blandit@quam.com,1-633-389-7173,2012-05-10T03:53:40-07:00
+2,McKenzie,Burris,mauris.Morbi.non@nequeNullam.com,1-906-235-0832,2013-07-06T07:23:09-07:00
+3,Amethyst,Morgan,dui@magnis.ca,1-548-366-6273,2012-06-16T13:28:33-07:00
+4,Lamar,Hardin,pharetra.felis.eget@mattisInteger.com,1-519-693-8091,2013-12-02T06:45:30-08:00
+5,Keegan,Coleman,leo.Cras.vehicula@musProinvel.edu,1-998-626-8896,2012-11-15T16:55:29-08:00
+6,Marshall,Griffith,egestas.Aliquam@Proinvelnisl.edu,1-554-353-5053,2012-09-14T15:57:44-07:00
+7,Jonah,Deleon,Donec.tincidunt.Donec@dolor.org,1-782-671-2356,2013-12-13T15:29:38-08:00
+8,Jackson,Howell,eleifend@Nuncullamcorpervelit.ca,1-323-738-0807,2013-02-03T09:49:27-08:00
+9,Kieran,Edwards,a.enim@perinceptoshymenaeos.com,1-695-830-5757,2012-08-17T01:23:51-07:00
+10,Fiona,Howard,ut.quam@loremfringillaornare.org,1-494-585-2386,2013-02-17T04:23:46-08:00
+11,Jorden,Ruiz,iaculis.lacus.pede@temporerat.com,1-314-890-5249,2012-04-21T01:57:17-07:00
+12,Kendall,Burt,eu.eros@eutellus.org,1-141-379-8276,2013-08-20T18:03:11-07:00
+13,Blossom,Cantrell,Suspendisse.aliquet@estarcu.ca,1-369-893-7454,2013-04-17T11:36:58-07:00
+14,Latifah,Barron,est@mauris.edu,1-321-158-7603,2012-11-15T06:59:23-08:00
+15,Brenna,Horton,morbi@AliquamnislNulla.edu,1-564-409-7698,2013-09-05T21:28:41-07:00
+16,Ray,Alexander,ac@Duis.edu,1-400-270-5855,2013-06-27T17:59:41-07:00
+17,Tyler,Daniels,ac@morbitristiquesenectus.com,1-192-852-6320,2012-02-29T23:34:35-08:00
+18,Hanae,Kelly,Mauris.magna@loremfringillaornare.org,1-136-621-1133,2012-08-06T06:35:41-07:00
+19,Barrett,Chan,sed@mollis.org,1-268-800-8354,2013-08-29T15:24:48-07:00
+20,Wylie,Holden,et@nibhsit.com,1-174-288-4996,2013-06-19T12:55:10-07:00
+21,Hedda,Downs,pede.Nunc.sed@Sedauctor.ca,1-349-185-4895,2013-09-22T21:20:03-07:00
+22,Hope,Hooper,viverra@tristiquealiquet.edu,1-669-268-8015,2012-11-27T01:16:10-08:00
+23,Avram,Lloyd,Lorem@blanditatnisi.ca,1-834-324-8689,2012-05-05T11:07:33-07:00
+24,Emerald,Graham,placerat.velit.Quisque@euismodurnaNullam.com,1-191-903-4185,2013-01-13T12:22:46-08:00
+25,Bert,Mullen,mauris@velarcu.org,1-869-728-6513,2012-06-18T15:32:40-07:00
+26,Xerxes,Cohen,quam.vel.sapien@orci.com,1-268-787-2932,2012-10-21T07:14:04-07:00
+27,Xaviera,Simpson,Fusce.mi.lorem@ligulaAliquam.com,1-463-925-2269,2013-08-21T18:18:16-07:00
+28,Joy,Wooten,mi.Aliquam@pede.ca,1-814-208-3061,2013-12-18T18:38:01-08:00
+29,Kane,Good,euismod.in@vitaepurusgravida.com,1-648-965-8144,2013-09-29T16:40:34-07:00
+30,Blossom,Odom,commodo.at.libero@consectetueripsum.com,1-792-199-1426,2013-11-09T07:06:06-08:00
+31,Ivy,Wise,egestas.lacinia.Sed@consequatnec.org,1-680-405-9126,2014-01-17T14:35:46-08:00
+32,Allegra,Rosales,elit.pellentesque@Nullamenim.org,1-545-798-3482,2012-06-03T18:58:10-07:00
+33,Candice,Kent,neque.Morbi@risus.ca,1-533-455-0536,2013-03-21T23:00:29-07:00
+34,Yen,Ryan,Cras@Nuncullamcorper.edu,1-161-509-6241,2012-10-18T00:29:25-07:00
+35,Vivian,Larson,orci.Ut@et.edu,1-445-598-1973,2012-07-15T13:47:36-07:00
+36,Lawrence,Beach,risus@rhoncus.ca,1-678-303-4989,2013-04-20T16:26:59-07:00
+37,Marvin,Stuart,amet.ultricies.sem@vitae.edu,1-721-818-2782,2014-02-03T19:23:46-08:00
+38,Kimberley,Alvarado,sed.dui.Fusce@Morbiquis.com,1-877-365-2340,2013-08-03T10:54:15-07:00
+39,Yardley,Pruitt,eu@nullaante.com,1-471-640-8907,2014-01-10T20:32:37-08:00
+40,James,Oneill,pede.Cras@eleifendnec.org,1-881-215-2135,2013-10-16T14:18:31-07:00
+41,Florence,Ruiz,lorem@aliquet.ca,1-729-520-3677,2012-09-01T02:29:58-07:00
+42,Jerry,Ellison,sit.amet.consectetuer@elit.edu,1-396-500-9380,2013-11-23T04:39:22-08:00
+43,Aphrodite,Whitfield,enim.Curabitur.massa@elementumategestas.ca,1-328-695-3383,2012-09-26T07:50:21-07:00
+44,Hayes,Weber,ac@tincidunt.edu,1-711-759-7595,2013-09-30T14:02:02-07:00
+45,Justine,Mosley,nec.ligula@Pellentesquehabitantmorbi.edu,1-577-815-1542,2012-11-12T03:19:58-08:00
+46,Alfreda,Peck,eu.elit@rutrumeu.com,1-103-863-3199,2012-08-01T14:57:33-07:00
+47,Jessamine,Swanson,placerat.orci.lacus@malesuadaInteger.com,1-279-324-6219,2013-04-27T05:48:38-07:00
+48,Jemima,Mack,Duis.volutpat@Cumsociis.com,1-415-725-7745,2013-09-08T02:24:52-07:00
+49,Isabella,Santiago,erat@Duisami.ca,1-302-923-9793,2013-05-04T16:30:05-07:00
+50,Maia,Mathews,vulputate.risus.a@scelerisquemollisPhasellus.com,1-730-514-0531,2013-02-12T11:49:28-08:00
+51,Hiram,Freeman,ipsum.Phasellus.vitae@ullamcorpereu.com,1-628-507-8637,2012-06-09T00:10:50-07:00
+52,Kameko,Garrison,Morbi.neque.tellus@molestie.edu,1-625-688-7216,2013-10-28T20:53:47-07:00
+53,Ivy,Robinson,Phasellus.nulla@malesuadavel.org,1-884-748-4013,2013-02-09T12:35:03-08:00
+54,Zachery,Diaz,adipiscing.elit@nullavulputatedui.org,1-463-284-8324,2013-02-09T20:11:22-08:00
+55,Charissa,Mitchell,pede@utsem.com,1-261-763-9654,2013-08-09T14:24:07-07:00
+56,Montana,Hardy,vel@pellentesquetellussem.org,1-960-893-2196,2013-08-07T20:04:33-07:00
+57,Alexander,Henson,Nullam.nisl.Maecenas@aliquamenim.org,1-319-384-6588,2013-12-14T03:02:00-08:00
+58,Octavia,Odom,per.inceptos@nonfeugiatnec.com,1-526-745-3491,2012-08-23T10:11:19-07:00
+59,Ruby,Maddox,fringilla.est@mollisduiin.com,1-167-716-6832,2012-12-21T19:01:41-08:00
+60,Buckminster,Woodward,Curabitur.ut@metusAliquam.edu,1-325-675-7514,2013-10-08T04:42:47-07:00
+61,Troy,Vinson,eu@netus.ca,1-796-489-6093,2013-07-26T02:13:03-07:00
+62,Ivan,Hernandez,dui@Craseutellus.edu,1-316-167-5567,2012-12-14T03:08:33-08:00
+63,Riley,Nguyen,mollis.dui@sapiencursus.com,1-843-542-8970,2012-12-12T12:01:14-08:00
+64,Hermione,Hahn,Aenean.egestas@nonantebibendum.edu,1-728-385-0615,2012-08-08T14:23:43-07:00
+65,Jerry,Mcintosh,accumsan@dolortempus.com,1-905-802-7462,2012-09-04T16:56:26-07:00
+66,Tamekah,Fox,amet.consectetuer.adipiscing@vitae.ca,1-403-475-9211,2012-09-04T04:14:24-07:00
+67,Benedict,Lloyd,Vivamus.euismod.urna@nibhPhasellus.ca,1-381-127-3111,2013-11-20T23:37:15-08:00
+68,Chaim,Cherry,Etiam@Maecenasiaculis.com,1-808-829-9357,2012-11-09T12:04:05-08:00
+69,Paloma,Avila,dis.parturient@molestie.ca,1-486-797-8181,2012-03-05T19:11:11-08:00
+70,Cheryl,Hayes,et.ipsum@id.com,1-294-239-8095,2013-02-08T23:19:53-08:00
+71,Nash,Flynn,lorem@facilisisSuspendisse.edu,1-488-207-3219,2012-04-28T07:31:58-07:00
+72,Rebecca,Harris,Curae;.Phasellus@urnanec.org,1-676-586-0591,2012-02-14T04:56:51-08:00
+73,Althea,Mcintyre,sem.vitae.aliquam@temporeratneque.ca,1-286-518-4810,2012-05-02T03:43:30-07:00
+74,Brock,Paul,mattis.Integer@aliquetdiam.com,1-820-970-9769,2012-08-15T19:30:58-07:00
+75,Vanna,Maddox,nunc.id.enim@eunequepellentesque.org,1-373-765-8833,2013-03-04T13:26:24-08:00
+76,Maia,Morrison,egestas.Fusce.aliquet@quispede.edu,1-461-447-3331,2012-11-19T02:29:45-08:00
+77,Evan,Barnes,erat.in.consectetuer@Donec.com,1-138-812-2889,2012-07-18T15:20:31-07:00
+78,Sylvia,Gomez,vehicula.risus.Nulla@velfaucibusid.edu,1-209-542-6835,2012-10-04T05:03:22-07:00
+79,Noble,Mills,Quisque@NullamenimSed.ca,1-571-859-7437,2012-06-21T00:59:21-07:00
+80,Jaime,Bell,mus.Aenean@Curabitur.org,1-699-372-8480,2013-11-16T03:57:45-08:00
+81,Jarrod,Lopez,egestas.ligula@egestas.org,1-884-627-3686,2012-03-24T09:31:59-07:00
+82,George,Ball,a@etnetuset.ca,1-181-829-8754,2012-08-18T23:33:31-07:00
+83,Bevis,Mckenzie,justo.sit.amet@parturientmontes.edu,1-178-547-1872,2013-03-28T05:46:46-07:00
+84,Quintessa,Howell,eu.dui@ipsumleo.ca,1-347-212-6283,2012-06-01T01:55:28-07:00
+85,September,Fulton,sem.ut.dolor@leoin.ca,1-805-182-3676,2012-11-30T14:48:35-08:00
+86,Edan,Clements,erat.semper.rutrum@pedenonummy.ca,1-730-358-6414,2012-10-16T09:15:46-07:00
+87,Francis,Medina,Nam@neccursus.org,1-508-865-4972,2012-06-26T13:52:10-07:00
+88,Yetta,Faulkner,egestas.lacinia@semPellentesqueut.ca,1-336-978-3144,2014-01-02T08:27:26-08:00
+89,Davis,Vega,commodo.tincidunt@dolortempus.ca,1-323-721-0245,2012-06-17T07:55:40-07:00
+90,Wing,Hatfield,tincidunt.congue@turpisIncondimentum.com,1-651-165-4851,2012-03-03T08:24:57-08:00
+91,Quon,Wilcox,dictum.ultricies.ligula@quam.ca,1-920-144-5488,2013-05-21T03:52:19-07:00
+92,Carson,Lynch,Cum.sociis@magna.org,1-272-668-7475,2012-10-08T01:31:17-07:00
+93,Xaviera,Anderson,amet.metus@eu.ca,1-133-672-4970,2012-02-17T10:34:51-08:00
+94,Ivor,Weber,Nam@vulputate.com,1-852-509-0906,2013-12-26T16:29:43-08:00
+95,Stella,Armstrong,adipiscing.elit@dictum.edu,1-654-142-1913,2013-04-05T03:53:16-07:00
+96,Ann,Farrell,scelerisque@turpis.org,1-686-786-3777,2012-09-27T00:45:57-07:00
+97,Kennedy,Rich,euismod.est@iaculisodio.edu,1-553-644-9572,2012-10-01T16:00:53-07:00
+98,Adria,Santiago,nibh@nuncullamcorper.com,1-180-457-1157,2013-01-20T20:32:50-08:00
+99,Sarah,Waters,nonummy.ac.feugiat@diamSed.com,1-187-134-2333,2013-11-01T06:08:44-07:00
+100,Bernard,Price,tellus@tempordiamdictum.org,1-373-588-1689,2012-07-15T12:06:16-07:00
+101,Maia,Estrada,et.commodo@dictumeu.org,1-451-794-0013,2012-11-20T06:53:02-08:00
+102,Kimberly,Banks,cursus.non@nec.com,1-703-971-8342,2012-05-03T00:06:01-07:00
+103,Dane,Rosales,metus.Aliquam@auctor.edu,1-994-906-2567,2013-01-27T14:34:50-08:00
+104,Melodie,Whitehead,dui.Cras.pellentesque@vulputateposuerevulputate.com,1-665-590-7281,2012-12-31T00:00:46-08:00
+105,Bethany,Baird,est@lobortisauguescelerisque.org,1-801-168-8287,2013-07-13T23:46:53-07:00
+106,Haviva,Lane,ultrices.mauris@ornare.com,1-634-452-5636,2012-12-17T08:18:56-08:00
+107,Perry,Day,arcu.Morbi.sit@lacinia.com,1-233-161-7064,2012-09-13T20:24:40-07:00
+108,Sheila,Rollins,Pellentesque.tincidunt.tempus@Nullaeget.org,1-850-423-0956,2012-06-18T01:14:17-07:00
+109,Donovan,Melendez,vulputate.dui@insodaleselit.edu,1-842-548-9366,2012-08-09T05:30:44-07:00
+110,Leandra,Boone,feugiat.nec.diam@atauctorullamcorper.com,1-356-341-9774,2013-05-03T17:44:29-07:00
+111,Kaden,Matthews,ante@consectetuermauris.ca,1-906-932-5932,2013-07-28T01:32:22-07:00
+112,Eleanor,Ewing,faucibus.leo@Quisquenonummy.edu,1-853-831-2874,2012-09-18T17:44:06-07:00
+113,Ignatius,Bruce,nonummy@cursus.ca,1-951-554-7873,2012-11-09T07:45:33-08:00
+114,Hillary,Francis,vel.faucibus@arcu.edu,1-931-228-6606,2012-08-29T16:26:55-07:00
+115,Shana,Barry,Nunc.commodo.auctor@rhoncusNullamvelit.ca,1-582-360-6031,2013-11-01T23:02:31-07:00
+116,Nasim,James,orci@Curabituregestas.ca,1-677-247-8286,2013-09-04T21:48:34-07:00
+117,Wallace,Rogers,Sed@a.edu,1-550-263-3284,2012-03-30T18:50:30-07:00
+118,Zephr,Durham,et@mattisIntegereu.org,1-123-942-6496,2012-11-18T07:20:44-08:00
+119,Carla,Edwards,id.ante@sitametrisus.edu,1-165-394-8968,2014-01-01T05:50:18-08:00
+120,Shay,Lindsey,Ut.sagittis@velconvallis.ca,1-630-370-9934,2012-12-16T13:02:57-08:00
+121,Barbara,Carson,Morbi.sit@Duis.ca,1-522-329-1148,2013-12-31T18:17:37-08:00
+122,Leandra,Briggs,purus.Duis.elementum@consectetueradipiscingelit.org,1-976-869-3719,2014-01-27T09:23:19-08:00
+123,Amos,Ellis,ac@nequeInornare.edu,1-171-286-0476,2013-12-19T21:54:15-08:00
+124,Sylvia,Hernandez,bibendum.sed.est@nonluctus.edu,1-319-681-5937,2013-07-25T09:06:17-07:00
+125,Sandra,Burnett,ac@vitae.edu,1-487-424-1198,2012-06-01T05:31:05-07:00
+126,Kimberly,Espinoza,enim@Vivamuseuismod.org,1-126-610-3915,2012-06-03T00:23:28-07:00
+127,Yoshi,Good,leo.elementum@NullamnislMaecenas.ca,1-264-373-0363,2012-08-03T23:26:06-07:00
+128,Teagan,Burnett,neque.In.ornare@eget.edu,1-802-293-7973,2012-08-15T13:29:57-07:00
+129,Barbara,Kemp,malesuada.id.erat@porttitorscelerisque.com,1-917-944-3359,2014-01-18T08:05:10-08:00
+130,Sharon,Ramsey,erat.Etiam.vestibulum@commodotincidunt.edu,1-786-673-9886,2012-06-05T22:51:11-07:00
+131,Stuart,Lloyd,montes@Fuscefermentum.edu,1-565-700-7886,2013-07-31T20:40:30-07:00
+132,Tyler,Henry,Praesent.eu@tristique.ca,1-711-790-3864,2012-09-09T12:51:37-07:00
+133,Carter,Bolton,sit.amet@vitaesodales.ca,1-339-127-6111,2013-01-10T22:48:57-08:00
+134,Graham,Gonzalez,sodales.Mauris@at.com,1-854-240-5612,2013-10-03T14:00:35-07:00
+135,Tate,Noble,scelerisque.dui@ipsumdolorsit.org,1-124-745-9894,2012-06-23T20:37:49-07:00
+136,Zoe,Barr,Nullam@arcuacorci.ca,1-918-579-8663,2012-12-12T09:29:41-08:00
+137,Harper,Mitchell,orci.lobortis@Etiambibendumfermentum.com,1-410-490-8909,2012-10-14T07:07:06-07:00
+138,Fatima,Stafford,egestas.a@euplacerateget.ca,1-459-215-5529,2012-11-23T07:04:40-08:00
+139,Liberty,Taylor,aliquet.magna@Suspendisse.edu,1-671-561-4900,2013-11-08T06:43:44-08:00
+140,Berk,Sweeney,aliquam.eu.accumsan@ultricies.ca,1-555-107-0666,2013-09-08T09:11:41-07:00
+141,Oren,Zamora,Proin.ultrices@egetodio.edu,1-272-572-6814,2012-10-14T19:53:55-07:00
+142,Vera,Hewitt,ac.mattis.ornare@nibhAliquamornare.org,1-932-909-5799,2013-07-20T19:46:19-07:00
+143,Lucian,Morrison,convallis@commodotinciduntnibh.ca,1-460-952-3461,2013-06-09T21:04:11-07:00
+144,Heather,Langley,commodo.at@dolorsit.edu,1-471-951-9180,2013-11-06T04:01:09-08:00
+145,Quamar,Mckay,cursus.in.hendrerit@nullaanteiaculis.org,1-808-355-3908,2014-01-22T22:36:07-08:00
+146,Sandra,Keller,vestibulum.massa@turpisNullaaliquet.edu,1-893-701-7876,2013-08-07T04:39:56-07:00
+147,Ila,Peterson,non@eudolor.ca,1-875-375-0506,2012-03-22T13:18:07-07:00
+148,Lane,Valencia,tortor@Duisrisusodio.edu,1-503-281-8389,2012-10-27T00:07:45-07:00
+149,Hedwig,Hooper,Mauris@libero.ca,1-574-624-2842,2012-10-26T15:48:41-07:00
+150,Lyle,Calderon,tellus@hymenaeosMauris.edu,1-712-640-5847,2012-04-24T22:58:48-07:00
+151,Dahlia,Rivers,Cras.pellentesque.Sed@lectus.org,1-870-154-2255,2012-11-05T16:41:25-08:00
+152,Xerxes,Christensen,malesuada.fames.ac@sollicitudincommodoipsum.com,1-543-128-8466,2012-08-05T03:41:48-07:00
+153,Linda,Sweeney,non@idenimCurabitur.edu,1-856-172-6643,2013-08-27T00:28:53-07:00
+154,Piper,Green,semper.rutrum@velpedeblandit.com,1-991-847-5066,2013-09-06T16:18:51-07:00
+155,Darryl,Hickman,luctus.sit@Donec.edu,1-383-947-2216,2013-12-15T14:11:48-08:00
+156,Ella,Anthony,blandit.viverra@metus.ca,1-886-493-0176,2013-08-18T01:28:39-07:00
+157,Maggie,Wiggins,luctus.et.ultrices@eros.edu,1-208-439-0694,2014-01-20T04:59:51-08:00
+158,Dorothy,Wooten,diam.dictum.sapien@ametnullaDonec.ca,1-351-478-0387,2013-12-27T14:36:13-08:00
+159,Austin,Burke,vitae.purus@a.ca,1-779-739-1699,2014-01-27T13:05:58-08:00
+160,Quentin,Rowland,nisi.dictum@cursus.org,1-485-514-2255,2013-04-25T05:05:56-07:00
+161,Haviva,Sharp,velit@sempertellus.com,1-312-572-3509,2013-01-03T13:20:05-08:00
+162,Ashton,Boyd,dolor.Nulla.semper@sodaleselit.com,1-997-213-8518,2013-10-05T21:20:52-07:00
+163,Walter,Poole,auctor.ullamcorper@pharetra.org,1-547-898-7097,2013-04-10T10:12:18-07:00
+164,Ronan,Higgins,gravida.sagittis@purusac.ca,1-663-425-2128,2013-07-23T13:37:12-07:00
+165,Jenette,Elliott,mollis.Phasellus@accumsansedfacilisis.ca,1-606-405-1996,2012-04-20T10:20:04-07:00
+166,Aquila,Hammond,lacus@temporeratneque.com,1-408-720-5731,2013-10-22T11:31:31-07:00
+167,Rashad,Bradley,consectetuer@quamvelsapien.com,1-138-228-8329,2012-03-02T11:41:21-08:00
+168,Gail,Craig,lorem.sit.amet@atrisus.org,1-416-999-1603,2013-06-17T03:40:38-07:00
+169,Fletcher,Price,ullamcorper.Duis@euismodindolor.com,1-922-755-7975,2013-12-30T07:09:14-08:00
+170,Lance,Graves,non.nisi@tortorNunccommodo.org,1-656-827-1647,2013-08-20T22:24:59-07:00
+171,Courtney,Delgado,tortor.Nunc.commodo@elit.ca,1-954-741-2057,2013-03-02T14:01:14-08:00
+172,Branden,Estrada,fermentum.risus@utnisia.com,1-731-896-6183,2013-10-30T21:49:14-07:00
+173,Summer,Bates,egestas.blandit@enimCurabiturmassa.com,1-635-930-7532,2013-03-09T15:40:57-08:00
+174,Felicia,Franco,adipiscing@tristique.ca,1-866-584-8652,2013-12-09T09:12:15-08:00
+175,Kimberley,Lang,at@urna.com,1-285-839-0723,2014-01-27T01:02:13-08:00
+176,Joy,Diaz,enim@Aenean.edu,1-645-511-7768,2012-10-11T04:22:20-07:00
+177,Libby,Santos,risus@Sedegetlacus.org,1-864-836-2892,2012-08-12T20:52:09-07:00
+178,Elvis,Bartlett,Nulla.dignissim.Maecenas@faucibuslectus.ca,1-250-827-6850,2012-08-12T22:17:37-07:00
+179,Tanisha,Jenkins,accumsan@sagittis.ca,1-216-495-7256,2013-10-02T23:12:26-07:00
+180,Mercedes,Dyer,eu@idsapien.org,1-384-979-9641,2013-04-18T14:35:57-07:00
+181,Blake,Pacheco,sed@eleifendnecmalesuada.org,1-312-148-6107,2012-02-09T16:24:37-08:00
+182,Phillip,Kaufman,augue.porttitor@auctorullamcorpernisl.ca,1-708-662-8898,2013-10-04T18:14:35-07:00
+183,Shaeleigh,Romero,blandit@Curabitur.org,1-165-876-5519,2013-03-14T13:39:18-07:00
+184,Zelda,Stephens,purus@enimsit.org,1-298-178-8668,2013-12-24T17:27:42-08:00
+185,Callum,Park,mollis@Donecdignissimmagna.com,1-640-202-1903,2013-07-13T13:44:17-07:00
+186,Shafira,Moody,amet.dapibus.id@bibendumfermentummetus.com,1-842-608-5255,2012-02-11T18:50:59-08:00
+187,Brenda,Gould,magna@Nullaeuneque.org,1-268-369-6552,2013-08-18T16:12:33-07:00
+188,Amber,Harper,Cras.eu.tellus@turpis.org,1-845-470-9841,2013-03-11T00:37:40-07:00
+189,Haviva,Harper,Quisque.tincidunt.pede@justoPraesent.ca,1-728-473-6876,2012-06-26T13:29:58-07:00
+190,Deirdre,Wilkins,posuere@urnanecluctus.com,1-325-209-3431,2012-10-27T22:32:46-07:00
+191,Ivana,Stark,nunc.sed.pede@auctorvitae.edu,1-174-752-3723,2012-07-22T15:45:20-07:00
+192,Omar,Bishop,Nulla.tempor.augue@Nunc.org,1-506-840-0997,2012-06-30T14:27:24-07:00
+193,Dominique,Lynch,turpis.Nulla.aliquet@Fuscemi.ca,1-301-683-9547,2013-02-19T13:45:30-08:00
+194,Perry,Pope,molestie.tortor.nibh@tincidunt.edu,1-142-231-9667,2013-12-22T12:15:02-08:00
+195,Alika,Dorsey,risus@luctusut.edu,1-203-167-8357,2013-05-27T07:37:40-07:00
+196,Sloane,Reynolds,Ut.tincidunt@mollisPhaselluslibero.edu,1-943-900-6028,2014-01-15T07:53:21-08:00
+197,Abra,Sanders,arcu@interdumCurabiturdictum.com,1-182-827-5052,2012-10-06T13:17:52-07:00
+198,Blaze,Gould,lorem@Nullaeu.org,1-377-980-7889,2013-01-24T02:20:11-08:00
+199,Talon,Ryan,condimentum@risusNuncac.org,1-712-327-5317,2012-05-13T21:05:15-07:00
+200,Merritt,Joyce,malesuada.fringilla@elitNullafacilisi.edu,1-702-580-4785,2012-02-22T10:09:03-08:00
+201,Fabio,Kounang,fabio@kounang.ng,08124299400,2020-04-30T20:00:03-10.00
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..4f4babb
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,3 @@
+Sesi 3 (20 menit)
+- Pisahkan codingan kamu yang ada pada file app.js menjadi model dan routes (mvc)
+- Gunakan callback atau promise pada model
diff --git a/router/movies.js b/router/movies.js
new file mode 100644
index 0000000..e69de29
diff --git a/views/editMovie.ejs b/views/editMovie.ejs
new file mode 100644
index 0000000..f88c8bd
--- /dev/null
+++ b/views/editMovie.ejs
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/views/movie.ejs b/views/movie.ejs
new file mode 100644
index 0000000..50229c7
--- /dev/null
+++ b/views/movie.ejs
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+ Halaman Movie
+
+
+
+ id |
+ Movie |
+ Released Year |
+ genre |
+ Production House |
+ Action |
+
+
+
+ <% dataMovie.forEach(movie => { %>
+
+ <%= movie.id %> |
+ <%= movie.name %> |
+ <%= movie.released_year %> |
+ <%= movie.genre %> |
+ <%= movie.name_prodHouse %> |
+ Edit |
+
+ <% }) %>
+
+
+
+
diff --git a/views/movieedit.ejs b/views/movieedit.ejs
new file mode 100644
index 0000000..b6810ad
--- /dev/null
+++ b/views/movieedit.ejs
@@ -0,0 +1,10 @@
+
+
+
+
+ Movie Edit
+
+
+
+
+
\ No newline at end of file
diff --git a/views/movies.ejs b/views/movies.ejs
new file mode 100644
index 0000000..124b76b
--- /dev/null
+++ b/views/movies.ejs
@@ -0,0 +1,20 @@
+
+
+
+
+ Movies
+
+
+ Halaman Movies
+
+ <% for(let i = 0; i < dataMovies.length; i++){%>
+
+ <%=dataMovies[i].name%> |
+ <%=dataMovies[i].released_year%> |
+ <%=dataMovies[i].genre%> |
+ <%=dataMovies[i].name_prodHouse%> |
+
+ <%}%>
+
+
+
\ No newline at end of file
diff --git a/views/prodHouse.ejs b/views/prodHouse.ejs
new file mode 100644
index 0000000..4d38f2f
--- /dev/null
+++ b/views/prodHouse.ejs
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+ Halaman Prod. House
+
+
+
+ id |
+ Production House |
+ Origin City |
+
+
+
+ <% dataProdHouse.forEach(prodHouse => { %>
+
+ <%= prodHouse.id %> |
+ <%= prodHouse.name_prodHouse %> |
+ <%= prodHouse.origin_city%> |
+
+ <% }) %>
+
+
+
+
diff --git a/views/prodHouses.ejs b/views/prodHouses.ejs
new file mode 100644
index 0000000..134824b
--- /dev/null
+++ b/views/prodHouses.ejs
@@ -0,0 +1,19 @@
+
+<% console.log(dataHouses) %>
+
+
+
+ Prod Houses
+
+
+ Halaman Prod. House
+
+ <% for(let i = 0; i < dataHouses.length; i++){%>
+
+ <%=dataHouses[i].name_prodHouse%> |
+ <%=dataHouses[i].origin_city%> |
+
+ <%}%>
+
+
+
\ No newline at end of file