This project uses frontend and backend logic to compile a media review application for books.
It uses:
๐น NodeJS and Express frameworks
๐น EJS for templating
๐น MongoDB for the database storage
๐น Filepond to help store and input pictures
In order to run this application you will need to have the following:
๐ธ MongoDB account
๐ธ NodeJS installed
๐ธ VS code installed
Change your directory to where you wish to run this script and store the cloned repository:
cd <filename>
Clone the repository from github and then move into the new directory.
git clone https://github.com/laurawarren88/media_review_app.git
cd media_review_app
Take a look ๐ around the file ๐ structure and see what is happening with VS code.
code .
You will need to add a .env ๐คซ file into the file tree to store the necessary information to run the script.
I'll walk you through it:
touch .env
vim .env
In the file you need to include your information โน๏ธ into the following variables:
DATABASE_URL=
NODE_ENV=development
SECRET=
After the '=' sign for DATABASE_URL input the connection for your MongoDB, it will look something like this: mongodb+srv://:@cluster0.ib6l0.mongodb.net/<cluster_name>?retryWrites=true&w=majority&appName=Cluster0
For the secret variable input anything you like.
Install the packages from package.json
npm start
Once you have the packages installed, set up your enviroment variables and are connected to your MongoDB you can run the application.
nodemon run start
This should then allow you to run the application in your web browser in the following location: http://localhost:3000.
From here you can set up a user and register and account and sign in.
Once you are signed in you can add reviews to books.
If you need to add books you will need to set up an Admin account in your MongoDB and set the user to isAdmin: true this will enable that user to add, edit and delte books.