- The put route was hands down the most difficult route to build for this project. I had a lot of trouble with retrieving the user input information to auto-populate the edit form as well as getting state to persist, I kept losing state on refresh as well as losing the updated information. My solutions to these two problems were 1. to use Optional Chaining (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) to keep state on refresh and as for the edit form, 2. I was able to use localStorage to grab the input values saved and have them populate the inputs on the edit form.
- Another challenge I faced was the post route. I kept running into losing state issues again and my route paths were crossed. All in all it was a mess until I started to figure out where the bugs were coming from by doing some console.log tracing AKA good ol' debugging from the backend to the frontend routes.
- Sign up/Log in and demo user login
- Van listings to view a collection of vans nearby
- Host and edit your vans that you post available to rent
- Under construction.....
- Clone the repository
git clone [email protected]:DevDre783/Nomadr-AirBnB-Clone.git
- Install necessary dependencies for node.js
npm install
- Create a database called
auth_db
- Set password as 'password' or any password. Note: make sure it is the same password as the one in the .env file variables
- Create a new env file with the appropriate settings.
- Run migrations and seed data:
npx dotenv sequelize db:migrate
&&npx dotenv sequelize db:seed:all
- Start both the backend and frontend server: cd into each folder and run
npm start
- JavaScript
- Express
- Git
- React
- CSS
- Redux
- Heroku
- Sequelize
- PostgreSQL