Travel Lovers is an application that allows a travel enthusiast to create an account to log past, upcoming, and bucket-list trips.
- Heroku
- Express.js
- MySQL2
- Sequelize
- Jest
- Insomnia
- Handlebars.js
- Sass
- Bulma
- jQuery
- bcrypt
-
You do not need to install anything to run this application. Simply visit the Heroku link at the bottom of the Usage section to use the app.
-
If you would like to test the app, follow the instructions in the Test section.
AS A travel enthusiast
I CAN visit the Travel Lovers website
SO THAT I can add, edit, and delete places I have visited, plan to visit, and want to visit
WHEN I visit the site for the first time
THEN I am presented with the login page, which includes an account login form and account sign-up form
WHEN I choose to sign up
I MUST use a username, email, and password
WHEN I click on the sign-up button
THEN my user credentials are saved and I am logged into the site
WHEN I revisit the site at a later time and choose to login
THEN I am prompted to enter my email and password
WHEN I am signed in to the site
THEN I see navigation links for the homepage, dashboard, and logout
WHEN I click on the homepage option in the navigation
THEN I am taken to the homepage and presented with a welcome image
WHEN I click on the dashboard option in the navigation
THEN I am taken to the dashboard and presented with past, upcoming, and bucket-list trip categories via kanban board
FOR EACH kanboard board category
I CAN add, edit, and delete; past, upcoming, and bucket-list trips
OFFERING a travel enthusiast an organized travel log
Heroku Link: https://travel--lovers.herokuapp.com/
Permission to use this application is granted under the MIT license. Click on the link for more information: MIT License Information
- Download Node.js and MySQL
Make sure that you have Node.js installed on your computer by entering node -v in the command line. If successful, the command prompt will return a version number. If not, try reinstalling Node.js by following this link: https://nodejs.org/en/ and clicking on the LTS version. If you are on Windows, make sure to look for the section that says Download for Windows (x64)
. If you are using macOS, make sure to look for the section that says Download for MacOS (x64)
To install MySQL, visit the MySQL website in the following link: https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/. Once there, look for the correct installation guide for your computer under Table of Contents
and follow the instructions on the page.
-
Clone the repository from GitHub Once Node.js and MySQL are downloaded, click on the green code button in GitHub and copy the link to this repository. Then open up your favorite code editor and open the terminal. In the terminal use
cd
to go to the root directory you want this repository to be cloned to. Finally, in the terminal, typegit clone <file link>
to clone this repository to your directory. -
Before starting the server you will need to configure the .env-example file to a .env file and put in the database name, your MySQL username, your MySQL password, and a secret for the session. The secret can be any combination of letters, numbers or special characters. If you do not make a .env file, THE CODE WILL FAIL. This is because environmental variables are set up for the database name, your MySQL username and password, and the secret session id.
-
Run
npm install
in the bash terminal to download the application dependencies -
Log into MySQL by running
mysql -u root -p
in the command line and enter your MySQL password. -
Run
source db/schema.sql
to create the travel_lovers_db database. If you would prefer to have preseeded data, runnpm run seeds
instead. -
To exit MySQL run
quit
. -
Then you can run
npm start
to start the server. This will run SASS and Nodemon at the same time.
- Run
npm test
to run Jest for tests on constructors
Insomnia was used to seed and test the routes for this app. There is no command for running these tests.
-
To test the application, download insomnia. For more information on Insomnia, follow this link: https://docs.insomnia.rest/.
-
Run
npm run seeds
in the command-line to get preseeded data. -
Run
npm start
to start the server -
Go to Insomnia and test for the route you want to test. Make sure to change the route from GET to POST, PUT, Or DELETE depending on what you want to test for.
-
The routes will be as follows (change users to posts or comments if you would like to test those routes and change :id to the id of the route you are testing for):
- GET (all users): http://localhost:3001/api/users
- GET (one user): http://localhost:3001/api/users/:id
- POST: http://localhost:3001/api/users
- PUT: http://localhost:3001/api/users/1
- DELETE: http://localhost:3001/api/users/2
If you have any questions about this projects, please contact me directly at nicnolen@gmail.com. You can view more of my projects at https://github.com/nicnolen.