As a snake owner in the Richmond area, I want to join a forum where I can share my love for snakes and snake ownership with others in my city. I want to be able to post helpful links for my friends, access what they have posted, and allow for forum members to comment on the links posted.
When I go to the forum homepage, I can either login in with my email and password, or if I am a first time user I can sign up by creating a username, and entering my email address and password. Once I log in I go to a dashboard that features all of the links posted by forum members. When I click on a link, it takes me to that hyperlinked page. When I click on the comments link, I can read members' comments, and add comments of my own.
- Express
- Sequelize
- MySQL
- Halfmoon CSS
This project requires Node.js and other dependencies
Navigate to the directory you would like to use using the CLI and then clone this repository:
git clone git@github.com:jefid/pets-r-app.git
Create .gitignore
to include the following:
node_modules
.env
.DS_Store
package-lock.json
.env
will hold your sensitive information.
DB_NAME='pet_db'
DB_USER='root'
DB_PW='YOUR_PASSWORD_HERE'
Open your IDE and use these commands to install all the necessary packages:
npm i bcrypt mysql2 dotenv express sequelize node
connect-session-sequelize express-handlebars express-session handlebars halfmoon
npm init
npm init
will create your package.json
file.
Make sure package.json
includes the seed in your scripts:
"scripts": {
"start": "node server.js",
"seed": "node seeds/index.js"
}
Login to MySQL with your credentials.
mysql -u root -p
In the MySQL terminal, start the database
USE pet_db;
Go back to your main terminal or VS Code powershell and enter
npm run seeds
Finally, start the server from the command line:
npm start
Have something you'd like to add?
Feel free to contact me via email!