https://quiet-everglades-33653.herokuapp.com/
The Wanderlust Travel Blog allows users to add and edit trips to ensure all their memories are kept in one place. On the site users can add new trips, edit existing trips, and delete trips that may not have happened or that you want to forget. Within the trips, users can also upload images for their trip and create a daily log within each of their trips.
Please make sure to have following programs installed on your computer to use this application:
To use this application, git clone
the repo down to your local. Then, run npm install
in order to install the dependencies as specified in the package.json
(bcrypt, body-parser, connect-session, dotenv, express, express-handlebars, express-session, multer, mysql2, nodemon, sequelize) will be installed. Now, you are ready to go!
To use this application, follow the instruction below:
- First, run
npm install
on your terminal, then it will install the requirednpm
packages. - Second, let's create the database -
travel_db
:mysql -u root -p
: login toMySQL
then type the following commends:source ./db/schema.sql;
: this will createtravel_db
show databases;
: Now, you will seetravel_db
in theDatabase
listuse travel_db;
: it is empty now.show tables
: there is no tables yet.exit
: exit the mysql terminal
- Third, let's include tables in the database we just created,
travel_db
:node ./seeds/seed.js
ornpm run seed
: these will insert the following tables in thetravel_db
:comment
daily
image
trip
user
- Now, let's run the program:
- Set an Environmental Variable in
./.env
file:touch .env
: this will create./.env
file- Now, add the following lines in
./.env
- DB_NAME="travel_db"
- DB_USER="root"
- DB_PASSWORD="your_mysql_password"
- DB_HOST='localhost' OR '127.0.0.1'
- Then, run the program with one of the following approaches:
node server.js
ornpm run start
: these will startnode
program in normal way.npm run nodemon
: this will startnode
program withnodemon
, which monitors the project directory and automatically restarts your node application when it detects any changes.
- Now, check the results in your localhost:
- localhost:3003/
- Set an Environmental Variable in
The directory for this application is as follows:
- ./assets: project workthrough video & supporting materials
- ./config: this will allow you to connect to the
mysql
database - ./controllers: these javascript files will create (or define) each route's behavior
- ./db: this will create a database,
travel_db
, with empty tables. - ./models: these javascript files will create
Sequelize
models for each table intravel_db
- ./Public: css style files and additional javascript files
- ./seeds: these javascript files will create (seed) tables in
travel_db
- ./utils: helper files to use handlebars
- ./views: Express-Handlebars related files
- ./env: Environmental variable definitions
- ./.gitignore: specifies intentionally untracked files that Git should ginore
- ./LICENSE: MIT License
- ./package.json: specifics of npm's package.json handling
- ./server.js: main node.js program Javascript file
- ./README.md: readme file
Also used to build this application:
- bcrypt
- multer
- Bulma
Login Page - User will have to login to view Dashboard, create/edit/delete trips, or comment on trips
Dashboard - Users will only see their trips and be able to create new trips, view trip details, edit their trip, or comment on the trip
- Torre for all the support in getting our application running.
- Jason, Awais, Bradley, and Walter for answering all of our questions and letting us stay late to finish things up for the night.
If you have any questions, feel free to contact one of our team members via information below:
- Tracy Mortara:
- [Github:] https://github.com/TMortara
- Jungwoo Lee:
- [GitHub:] https://github.com/jungwoo33
- [Email:] jungwoo33@gmail.com
- [GitHub:] https://github.com/jungwoo33
- Koby Sillito:
- [GitHub:] https://github.com/KobyS82/
- Riley O'Bryan
- [GitHub:] https://github.com/rmob
- [Email:] riley.obryan@gamil.com
- [GitHub:] https://github.com/rmob
- Kaylon Myers