koketsomotse / Aura-API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aura-API Read ME

HOW TO RUN PANIC API APP.

-create a new folder and ensure all folders are in one folder -you will need to have the following installed: • MySql database • VS code • Node.js -after, you will need to install the following modules and dependencies through the command line one by one: • npm i -g install express • npm i -g install joi • npm i -g install mysql

-then inside the root folder you will double click inside the folder path directory and type ‘cmd’ to open the command prompt. -then type: node script.js -a message will display saying it is running here!. This means the project is now running through node.js -then you will open your browser and in the url section type in: http://localhost/posts. -you will be able to view the user interface, but all thie information will not show unless you are connected to the database.

HOW TO ACCESS AND INTERACT WITH MY SQL DATABASE.

-you will need to access your mysql database on your machine through work bench or the my sql command prompt. -you will need to enter the password you have created when installing mysql. -once you in, you will need to create a table called people. (use mysql query) -then you use that table (use mysql query) -then create a new user into the database (use mysql query) -then go into the project folder and open the database.js file, you will need to ONLY change the password to YOUR password. -then save and close all folders, go to the folder directory and type ‘cmd’ -type in: node script.js. -go to the browser , refresh, you now should be able to view the project on your browser.

About


Languages

Language:EJS 72.2%Language:JavaScript 27.8%