GRILLRILLA is a real time Food Ordering website made with Node JS and Express Js. Mongodb is used as the database.
To run this app in your PC you have to follow these Steps.
Client: Socket.io, TailwindCSS, EJS Server: Node, Express
- Node Js refer here
- Mongodb refer here
- Stripe refer here
Clone the project
git clone https://github.com/Karan-Dhingra/GRILLRILLA.git
Go to the project directory
cd my-project
Install project with npm
- For Initializing npm modules, just press enter for each questions asked and move on.
npm init
- Install Express
npm install express
- Install Engine
npm install ejs express-ejs-layouts
- Install Nodemon to run our project
npm install nodemon -g
- To import features of Tailwind CSS in our project
npm install tailwindcss
- To connect with mongo db
npm install connect-mongo
- To install mongoose
npm install mongoose
- To store session in our database
npm install express-session
- To use .env file
npm install dotenv
- Axios for creating http requests
npm install axios
- To get notification
npm install noty
- To flash results and error if there are
npm install express-flash
- Passport helps in checking and login
npm install passport passport-local express-session
- It is used to store password in hash for SECURITY
npm install bcrypt
- To store current time stamp
npm install moment
- For making realtime events //using this we dont require to reload our page again for latest updates.
npm install socket.io
- We have to add Stripe feature to use them //Build Payment Gateway
npm install stripe[@stripe/stripe-js]
- Install Stripe //using this we dont require to reload our page again for latest updates.
npm install stripe
- Plugin for Advance JS because of Larwel Mix
@babel/plugin-proposal-class-properties
Before running app you need to do some more steps.
Go to file .env.example
file rename file to .env
COOKIES_SECRET =
MONGO_CONNECTION_URL =
STRIPE_PRIVATE_KEY =
You will find something like this after renaming file to .env
just write something here.
in COOKIES_SECRET
you can write anything like This is Cookie
In MONGO_CONNECTION_URL
fill the address of your database. For this if you are
locally on your PC just go to Mongo Compass and make a database let it be GRILLRILLA
make a collection menu and insert Menu content by uploading file.
You have a Menu.json
file just upload there.
After making database add mongodb://localhost/GRILLRILLA
make sure your database name is GRILLRILLA
.
In STRIPE_PRIVATE_KEY
you have to write Stripe key for this you have to sign in Stripe.com
link is given above in Pre-requists. This Private key is available on Stripe.com
Steps to get your Private Key is SignIn > Developers [You will se Dashboard, On Left Side in Navbar] > API Keys > Secret Key [Reveal Test Key] copy it and paste there.
That's it you have to go to local check in terminal on which port your app is
running. Mostly it is http://localhost:3000/