sudo yum install git
git version
cd ~ec2-user
git clone https://github.com/First-Cloud-Journey/000004-EC2.git
cd 000004-EC2
ls
npm init
You proceed to configure the application’s information and it is saved in the file package.json
npm install express dotenv express-handlebars body-parser mysql
ls
touch .env
DB_HOST = 'localhost'
DB_NAME = 'DB_NAME'
DB_USER = 'root'
DB_PASS = 'password'
In the lab we use the database name awsuser and the database information has been configured in the database security configuration step (password: 123Admin)
ls -a
npm install --save-dev nodemon
npm start
INSERT INTO `user`
(`id`, `first_name`, `last_name`, `email`, `phone`, `comments`, `status`) VALUES
(NULL, 'Amanda', 'Nunes', 'anunes@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Alexander', 'Volkanovski', 'avolkanovski@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Khabib', 'Nurmagomedov', 'knurmagomedov@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Kamaru', 'Usman', 'kusman@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Israel', 'Adesanya', 'iadesanya@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Henry', 'Cejudo', 'hcejudo@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Valentina', 'Shevchenko', 'vshevchenko@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Tyron', 'Woodley', 'twoodley@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Rose', 'Namajunas ', 'rnamajunas@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Tony', 'Ferguson ', 'tferguson@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Jorge', 'Masvidal ', 'jmasvidal@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Nate', 'Diaz ', 'ndiaz@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Conor', 'McGregor ', 'cmcGregor@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Cris', 'Cyborg ', 'ccyborg@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Tecia', 'Torres ', 'ttorres@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Ronda', 'Rousey ', 'rrousey@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Holly', 'Holm ', 'hholm@ufc.com', '012345 678910', '', 'active'),
(NULL, 'Joanna', 'Jedrzejczyk ', 'jjedrzejczyk@ufc.com', '012345 678910', '', 'active')