Pre requisites
- node.js
- oralc einstant client
To setup backend:
-
create a folder to hold all this, then inside that folder create backend folder.
-
cd backend
-
npm init-y
-
npm i --save express
-
npm i --save-dev nodemon dotenv oracledb
-
In backend folder 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 .end file add:
USER_NAME=jonathan.trost Your gatorID DB_PASSWORD= This is the passowrd you get from: https://register.cise.ufl.edu/oracle/ DB_URL=//oracle.cise.ufl.edu/orcl
-
Ok, ensure the following is at the top of server.js const dotenv = require('dotenv'); dotenv.config();
-
in the getConnnection line, in user: put process.env.USER_NAME, for password: process.env.DB_PASSWORD, for conneciton string process.env.DB_URL
-
now in terminal type node server.js, you will know if it worked if you see the following: Successfully connected to Oracle Database. MAKE SURE YOU ARE CONNECT TO THE CISER VPN! 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
To Setup Frontend:
- go into directory that has backend
- type npx create-react-app Oracle_Reactors
- This will make new directory, calle doracle reactors, go into it and test that it works npm start.
- npm install bootstrap
- npm install react-bootstrap
- npm install react-router-dom
To setup project in new directory.
- Go to a directory you want to setup the project.
- Git clone the repo
- Find the node_modules folder in your react app and move it to the frontend folder.
- Find the node_modules folder in your backend server and move it into the backend folder.
- Test npm start in frontend.
- Test nodemon server.js in the backend. (make sure you're connected to cise vpn)