Name | Institute ID | ||
---|---|---|---|
Om Morendha | omkmorendha@gmail.com | 20bcs095 | Backend |
Nikam Yash | 20bcs093@iiitdwd.ac.in | 20bcs093 | Frontend |
Nimish Mangee | 20bcs094@iiitdwd.ac.in | 20bcs094 | Frontend |
Prakash Agarwal | prakash02dec@gmail.com | 20bcs099 | Backend |
Sudeepto Chatterjee | sudeepto11032001@gmail.com | 20bcs130 | Frontend |
- Here, we want to provide a service for medium-to-high end restaurants to avail more reservations.
- Since our service is similar to "Bookmyshow" or "Zomato", restaurants would also get organic marketing in a similar manner.
- Our website would also help users to find good restaurants in their area.
- HTML/CSS
- Javascript
- Bootstrap
- NodeJS
- Express.js
- MongoDB
- "body-parser": "^1.19.0",
- "cors": "^2.8.5",
- "dotenv": "^10.0.0",
- "ejs": "^3.1.6",
- "express": "^4.17.1",
- "express-session": "^1.17.2",
- "lodash": "^4.17.21",
- "mongoose": "^6.0.14",
- "mongoose-findorcreate": "^3.0.0",
- "passport": "^0.5.0",
- "passport-google-oauth20": "^2.0.0",
- "passport-local": "^1.0.0",
- "passport-local-mongoose": "^6.1.0"
- "multer": "^1.4.4",
- "port": "^0.8.1"
YOU WILL NEED MONGODB ATLAS CLUSTER, GOOGLE DEVELOPER ACCOUNT AND PAYTM DEVELOPER TO STEP ENV FILE CREDENTIAL
Note : Always keep below env credential personal plzz dont share for secuirty purpose
Create .env file as below.
GOOGLE_CLIENT_ID =
GOOGLE_CLIENT_SECRET =
MERCHANT_ID =
MERCHANT_KEY =
WEBSITE=WEBSTAGING
CHANNEL_ID=WEB
ATLAS_USER_ID=
ATLAS_USER_PASSWORD=
Install the dependencies and devDependencies and start the server.
$ npm install
$ npm app.js
- Open below url in browser! http://localhost:3000/
- Mobile no=7777777777
- OTP = 489871
- any card CVV = 123
- Login into AWS and under the Services tab -> Compute, click on EC2.
- After navigating to the EC2 dashboard, click on the “Launch Instance” button.
- On AMI (Amazon Machine Images) selection page, we will choose Ubuntu 20.04 LTS which is also free-tier available or you can choose of your own choice
- Choose the default instance type which is t2.micro.
- Leave the default configurations for Configure Instance Details and Add Storage
- Give a Tag resdine with key 123
- In Configure Security Group, we will make SSH rule , HTTP rule , HTTPS rule , CUSTOM TCP rule with port 3000 for node js server and use source as anywhere.
- Click on Review and Launch and save key pair
- In the instance details click on the “Connect” button,here we will connect through SSH. we expect you already install AWS CLI on your system.
- Copy the example link and paste in your terminal here you get connected with your instances
- Now follow the following code in your terminal.. And I will be using little bit vim here
sudo apt-get update
sudo apt-get upgrade
sudo su
- Now here git clone your files..
mkdir server
cd Restaurant-Reservation-system-
cp * -r /home/ubuntu/server
cd ..
cd server
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt install nodejs
npm install
vim /etc/environment
- Now press I to insert and use arrows keys if you dont know how to navigate with H J K L inside vim mode then press escape then type :wq to save.. now on terminal type reboot and reconnect with instances ..
sudo su
cd server
- Now make sure the package.json file to have a npm start under script as below for example
"scripts": {
"start": "node app.js"
}
npm start
- Go to the instance IPv4 address + "3000" ,make sure address starts with HTTP as we haven’t added SSL encryption so you can’t access it through HTTPS.
- Now we will install a library called pm2, which will keep our application running on the background..
sudo npm i -g pm2
pm2 start index.js
- Finally , we will install and set-up Nginx as a reverse-proxy to redirect out application to the default port 80
sudo apt-get install nginx
vim /etc/nginx/sites-enabled/default
- Now paste the below code
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name localhost;
root /usr/share/nginx/html;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
- Restart the nginx
sudo service nginx restart