Trickle-Trip is a group savings app that lets users save money for their desired trip along with their friends. This app has a search function that utilizes the G-Adventures API that has over 1,300 trips that users can book that include information such as itinerary, meals, accommodation, and many more. Users can also double their drip (daily withdrawal from their chequing account) once per day that has a very small chance of winning prizes through the app's "Surprise Mechanic".
- Node.js
- Express
- React
- React-Router-Dom
- CSS and SASS
- PostgreSQL
- Knex
- Axios
- Cypress (for testing)
You need TWO terminal windows/tabs for this (or some other plan for running two Node processes).
In one terminal, cd into react-front-end. Run npm install or yarn to install the dependencies. Then run npm start or yarn start, and go to localhost:3000 in your browser.
In the other terminal, cd into express-back-end. Run npm install or yarn to install the dependencies, then npm start or yarn start to launch the server.
Set up: first try npm install, if you run into errors relating to these, you may need to additonally install these:
- npm install knex
- npm install pg
- npm install dotenv
-
In express-back-end root, add .env file (use .env.example as template)
-
set:
- username as development
- password as development
- database name as trip_savr
-
on command line,
cd [path to]/express-back-end -
type
psql -U development -
should ask for password - put
development -
in psql, type
CREATE DATABASE trip_savr -
on command line, run
npx knex migrate:latest -
if successful, will see "Using environment: development Batch 1 run: 1 migrations"
-
on command line, run
npx knex seed:run
For debug see below:
- run
http://localhost:8080/api/debug/deletealldatain browser orcurl http://localhost:8080/api/debug/deletealldatato clear all data from database - you should see a database cleared message - In cd /express-backend, run
npx knex migrate:listto check which migration you are currently running (2.1 if you are not running the latest, runnpx knex migrate:latestto update) - run
npx knex seed:runto populate the database with data
To revert database to original:
- clear data using step 1. in "How to reset the database"
- run
npx knex migrate:rollbackto rollback to the original database. - You can choose specifically which migration to rollback to by doing
knex migrate:down xxxx_migration_name.jsto move up a migration, doknex migrate:up xxxx_migration_name.js
LinkedIn
GitHub



