Texas Automobile Collision Trends Analyzer (TACTA) is a database based web application that analyzes variety of factors that cause car collisions in state of Texas.
- Node.js
- Oracle Instant Client
- Create a directory to hold a full stack application (e.g. Oracle_Reactors), then inside that directory create a directory named backend.
(Note: All commands below are run using the command line assuming a user is within the full stack application directory. e.g. ~/Desktop/Oracle_Reactors/)
-
cd backend
-
npm init-y
-
npm i --save express
-
npm i --save-dev nodemon dotenv oracledb
-
In backend directory, make file
server.js
-
Copy and paste the code from oracle node.js setup site into server.js.
-
Create a
.env
file in backend directory -
In
.env
file add: USER_NAME=jonathan.trost (Your gatorID) DB_PASSWORD=InsertOraclePasswordHere (This is the password you get from: https://register.cise.ufl.edu/oracle/) DB_URL=//oracle.cise.ufl.edu/orcl -
Ensure the following is at the top of
server.js
const dotenv = require('dotenv');
dotenv.config();
-
In the
getConnnection
line put: for user:process.env.USER_NAME
for password:process.env.DB_PASSWORD
for connectionstring process.env.DB_URL
-
Now in
terminal
typenode server.js
. (Make sure you are connected to the UF CISE VPN!!!)You will know if it worked if you see the following:Successfully connected to Oracle Database
. 5 Rows Inserted Task 1 is NOT done Task 2 is NOT done Task 3 is done Task 4 is NOT done Task 5 is done
-
From the command line, go into directory that also has the backend directory (e.g. ~/Desktop/Oracle_Reactors/)
-
Type
npx create-react-app oracle_reactors
in the command line. This will create a new directory called oracle_reactors. -
Use the command
cd frontend
to move into the frontend directory and test that it works by using the commandnpm start
. Assuming it works, run the following commands: -
npm install bootstrap
-
npm install react-bootstrap
-
npm install react-router-dom `
-
Go to or create a directory you want to setup the project in.
-
Git clone the repo.
-
Find the node_modules directory in your react app and move it to the frontend directory.
-
Find the node_modules directory in your backend server and move it into the backend directory.
-
Test npm start in frontend.
-
Test nodemon server.js in the backend. (Make sure you are connected to the UF CISE VPN!!!)