An online food ordering system developed using MEAN (MongoDB, ExpressJS, Angular, NodeJS) with jwt authentication enabled and password encrypted.
Live Demo: https://order-my-food-online.herokuapp.com/
- Node LTS version
- git
- Angular CLI
- Clone the repository in your local machine.
- Navigate to
client
directory and run the commandnpm i
. Do the same forserver
directory. - Navigate to
server
directory , create a file named.env
. - Inside the
.env
file, add your mongodb remote string asDB_CONNECTION
and a secret key (any string) for your jwt token asSECRET_KEY
(refer this file - https://github.com/kishan0725/order-my-food-MEAN/blob/main/server/.env.example). - Go to your atlas mongodb, create a new collection called
hotels
under the database that you created and copy the contents of the hotel details from here - https://github.com/kishan0725/order-my-food-MEAN/blob/main/client/src/assets/api/data.json and insert it in yourhotels
collection. - Run the command
node server
from theserver
directory and navigate to your localhost url. - Now, you should see the application running in your browser.
- Go to
server.js
, uncomment the lines from 10 to 14 and comment out the lines from 18 to 26. - Save the changes and run
node server
under theserver
directory. - Go to
client/src/environments/environment.ts
, comment out the line no. 8 and uncomment line 7. - Do whatever changes you want in the application and save it.
- Run the command
ng serve
under theclient
directory. - Open the localhost URL shown in your terminal.
- Now, you should see the changes that you made in the application.
- Once the changes that you made are okay for you, go to
client/src/environments/environment.ts
, uncomment line no. 8 and comment out the line 7. - Save the changes and run the command
ng build --prod
in theclient
directory. - After the successful build, replace the contents of the
public
folder under theserver
directory with the contents ofdist/order-my-food
in theclient
directory. - Go to
server.js
, comment out the lines from 10 to 14 and uncomment the lines from 18 to 26. - Run the command
node server
under theserver
directory. - Open the localhost URL shown in your terminal.
- Now, you can verify the changes that you made and deploy it wherever you want (In my case, I deployed it in the Heroku).
Please do ⭐ the repository, if it helped you in anyway.