- Fork and Clone Repo
npm install
at root of directorynpm start
at root to start react app on localhost 3000cd
into 'src/server' andnpm start
to open server on localhost 3001- pull postgres from docker:
docker exec -it <container-ID> bash
psql -U postgres
- Create a database called
cheatsdb
CREATE DATABASE cheatsdb;
- Spin up knex in terminal from src/server path:
npx knex migrate:latest
will add a table to your DBnpx knex seed:run
will fill it with some initial values
- You can add 'cheets' to your library on the Add a Cheet page. Specify a categoru to file it or leave thhe category blank to file it in "Other"
- NOTE: After finising the project that was working smoothly, our DB crashed. When bringing back up, we noticed that it OCCASIONALLY takes several submits to get the first item to display on the home page.
- On the home page, you can see all your logged cheats and filter them based on category.
This project is your first foray into full stack development! We want you to create a CRUD application that:
- stores some user-generated data in a database
- is able to retrieve and manipulate that data properly
This application should have:
- React front end
- Express server
- PostgreSQL database.
Create a coding cheatsheet hub
- Inputs into a field
- Push Inputs into a list
- Post inputs to server using Express
- on submit, POST to server with a fetch()
- write inputs to local storage (data.json)
- send json data to '/'
- GET data from '/' to display
- replace local storage .json file with database using knex
-
Home Page
- Navbar
- Links to input sheet
- links to category
- Search Function
- Category (dropdown)
- Display Cheats based on category
- delete input option
- Navbar
-
Cheatsheet -> Input Cheat
- Input fields
- Title
- Description
- Category
- dropdown with a list of exisiting
- add button and input to add a new category to the list
- Input fields
- Add a dropdown selecter
- Use buttons to filter based on category
- Click on name to display description
- toggle view icon
- status: button clicks to toggle the view of description but does not toggle icon on button
- toggle view icon