Colleges
React app with PostgreSQL backend
Setup I Did
brew install csvkit
npm init
npm i pg
npm i c8 --save-dev # not used yet
npm i tap --save-dev # not used yet
npm i express
npm i dotenv
git init
git add .gitignore
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/aakoch/colleges.git
git add src/index.js
git commit -m "db setup"
git push -u origin main
# I uninstalled but was still having issues
npm uninstall -g create-react-app
yarn global remove create-react-app
# I was getting errors saying I needed to uninstall create-react-app globablly but I tried to and I still got the error. I resorted to appended the version.
npx create-react-app@5.0.0 client
Starting the App
Start the DB endpoint:
node src/index.js
Start the React app:
cd client
npm start
Tools Used (Besides NPM packages)
csvsql
Installed with homebrew.
Used to pull my stuff off of Airtable. I copied to a local .tsv file and converted to SQL inserts.
Example:
csvsql -t --db=sqlite:///test.db --insert locations.tsv
echo ".dump locations" | sqlite3 test.db > locations.sql
Links
Tools
- Express
- Create React App
- React - the thing that grabs recruiters' attention
- PostgreSQL
- node-postgres
- csvkit on Hombrew
- Airtable - where I started documenting my college search
- FreeMapTools - for getting distances
Articles
- How to Create a React App with a Node Backend: The Complete Guide
- Node.js PostgreSQL Connection
- How to Use Node Environment Variables with a DotEnv File for Node.js and npm
College Information
Miscellaneous
Airtable
I like Airtable, I just hit my max number of records in the base I was using.