├── .gitignore ├── images ├── res_5.jpg ├── res_6.jpg ├── rest_3.jpg ├── rest_4.jpeg ├── fried_rice.jpg ├── burgger_combo.jpg ├── chicken_afgan.jpg ├── chicken_dry.jpg ├── chicken_indi.jpg ├── chicken_roast.jpg ├── egg_vegetable.jpg ├── noddle_china.jpeg ├── pizza_mania.jpg ├── punjab-grill.jpg ├── rice_nonveg.jpg ├── yellow_chilli.jpg ├── bread_sandwich.jpg ├── rice_veg_bowl.jpeg ├── chicken_lolipop.jpeg └── light_break_fast.jpg ├── config └── AppConst.js ├── models ├── admin.js ├── food.js ├── restaurant.js ├── order.js └── user.js ├── controllers ├── errorController.js ├── adminController.js ├── foodController.js └── userController.js ├── routes ├── adminRoutes.js ├── foodsRoute.js └── userRoutes.js ├── middlewares ├── userAuth.js └── adminAuth.js ├── package.json ├── README.md ├── app.js └── access.log /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | config -------------------------------------------------------------------------------- /images/res_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/res_5.jpg -------------------------------------------------------------------------------- /images/res_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/res_6.jpg -------------------------------------------------------------------------------- /images/rest_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/rest_3.jpg -------------------------------------------------------------------------------- /images/rest_4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/rest_4.jpeg -------------------------------------------------------------------------------- /images/fried_rice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/fried_rice.jpg -------------------------------------------------------------------------------- /images/burgger_combo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/burgger_combo.jpg -------------------------------------------------------------------------------- /images/chicken_afgan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/chicken_afgan.jpg -------------------------------------------------------------------------------- /images/chicken_dry.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/chicken_dry.jpg -------------------------------------------------------------------------------- /images/chicken_indi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/chicken_indi.jpg -------------------------------------------------------------------------------- /images/chicken_roast.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/chicken_roast.jpg -------------------------------------------------------------------------------- /images/egg_vegetable.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/egg_vegetable.jpg -------------------------------------------------------------------------------- /images/noddle_china.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/noddle_china.jpeg -------------------------------------------------------------------------------- /images/pizza_mania.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/pizza_mania.jpg -------------------------------------------------------------------------------- /images/punjab-grill.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/punjab-grill.jpg -------------------------------------------------------------------------------- /images/rice_nonveg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/rice_nonveg.jpg -------------------------------------------------------------------------------- /images/yellow_chilli.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/yellow_chilli.jpg -------------------------------------------------------------------------------- /images/bread_sandwich.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/bread_sandwich.jpg -------------------------------------------------------------------------------- /images/rice_veg_bowl.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/rice_veg_bowl.jpeg -------------------------------------------------------------------------------- /images/chicken_lolipop.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/chicken_lolipop.jpeg -------------------------------------------------------------------------------- /images/light_break_fast.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/Food_Order_Backend/HEAD/images/light_break_fast.jpg -------------------------------------------------------------------------------- /config/AppConst.js: -------------------------------------------------------------------------------- 1 | exports.MONGODB_URI = 2 | "mongodb+srv://:@cluster0-l3k2e.mongodb.net/online_foods"; 3 | 4 | exports.APP_KEY = "APP_ACCESS_KEY"; 5 | -------------------------------------------------------------------------------- /models/admin.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const Schema = mongoose.Schema; 4 | 5 | const adminSchema = new Schema({ 6 | email: { 7 | type: String, 8 | required: true, 9 | }, 10 | password: { 11 | type: String, 12 | required: true, 13 | }, 14 | }); 15 | 16 | module.exports = mongoose.model("Admin", adminSchema); 17 | -------------------------------------------------------------------------------- /controllers/errorController.js: -------------------------------------------------------------------------------- 1 | exports.unAuthorised = (req, res, next) => { 2 | res.status(401).json("Request not authorised to provide response!"); 3 | }; 4 | 5 | exports.onError = (res, msg = "Something went wrong") => { 6 | //503 - service un available 7 | res.json(`Error: ${msg}`); 8 | }; 9 | 10 | exports.onInvalidEndpoint = (res) => { 11 | res.json("Please use valid endpoints to access resourcse!"); 12 | }; 13 | -------------------------------------------------------------------------------- /models/food.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const Schema = mongoose.Schema; 4 | 5 | const productSchema = new Schema({ 6 | name: { 7 | type: String, 8 | required: true, 9 | }, 10 | description: { 11 | type: String, 12 | required: true, 13 | }, 14 | category: { 15 | type: String, 16 | }, 17 | readyTime: { 18 | type: Number, 19 | }, 20 | rating: { 21 | rate: Number, 22 | }, 23 | price: { 24 | type: Number, 25 | required: true, 26 | }, 27 | images: { 28 | type: [String], 29 | }, 30 | }); 31 | 32 | module.exports = mongoose.model("Food", productSchema); 33 | -------------------------------------------------------------------------------- /routes/adminRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const router = express.Router(); 3 | const auth = require("../middlewares/adminAuth"); 4 | const AppError = require("../controllers/errorController"); 5 | const adminController = require("../controllers/adminController"); 6 | 7 | /** 8 | * PRIVATE ROUTES [Authorization required] 9 | */ 10 | router.post("/add-restaurant", adminController.addRestaurant); 11 | 12 | router.post("/add-food/:id", adminController.addFood); 13 | 14 | router.get("/view-restaurants", adminController.viewAllRestaurant); 15 | 16 | router.use(AppError.onInvalidEndpoint); 17 | 18 | module.exports = router; 19 | -------------------------------------------------------------------------------- /routes/foodsRoute.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const router = express.Router(); 3 | const userAuth = require("../middlewares/adminAuth"); 4 | const AppError = require("../controllers/errorController"); 5 | const foodController = require("../controllers/foodController"); 6 | 7 | /** 8 | * PUBLIC ROUTES 9 | */ 10 | router.get("/in-30-min", foodController.getInThirtyMinutes); 11 | 12 | router.get("/:id", foodController.getFoodDetails); 13 | 14 | router.get("/top/restaurants", foodController.getTopRestaurants); 15 | 16 | router.get("/restaurant/:id", foodController.getAllFoodsFromRestaurant); 17 | 18 | router.get("/", foodController.getAvailableFoods); 19 | 20 | router.use(AppError.onInvalidEndpoint); 21 | 22 | module.exports = router; 23 | -------------------------------------------------------------------------------- /models/restaurant.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const Schema = mongoose.Schema; 4 | 5 | const restaurant = new Schema({ 6 | name: { 7 | type: String, 8 | required: true, 9 | }, 10 | foodType: { 11 | type: String, 12 | }, 13 | pincode: { 14 | type: String, 15 | }, 16 | lat: { 17 | type: Number, 18 | }, 19 | lng: { 20 | type: Number, 21 | }, 22 | address: { 23 | type: String, 24 | }, 25 | phone: { 26 | type: String, 27 | }, 28 | rating: { 29 | rate: Number, 30 | }, 31 | images: { 32 | type: [String], 33 | }, 34 | foods: [ 35 | { 36 | type: Schema.Types.ObjectId, 37 | ref: "Food", 38 | }, 39 | ], 40 | }); 41 | 42 | module.exports = mongoose.model("Restaurant", restaurant); 43 | -------------------------------------------------------------------------------- /middlewares/userAuth.js: -------------------------------------------------------------------------------- 1 | const jwt = require("jsonwebtoken"); 2 | const { APP_KEY } = require("../config/AppConst"); 3 | 4 | module.exports = (req, res, next) => { 5 | const authorization = req.get("Authorization"); 6 | if (!authorization) { 7 | const err = new Error("Authorization error"); 8 | err.statusCode = 401; 9 | throw err; 10 | } 11 | 12 | const token = authorization.split(" ")[1]; 13 | let decodedToken; 14 | 15 | try { 16 | decodedToken = jwt.verify(token, APP_KEY); 17 | } catch (err) { 18 | err.statusCode = 500; 19 | throw err; 20 | } 21 | 22 | if (!decodedToken) { 23 | const err = new Error("unable to authenticated"); 24 | err.statusCode = 401; 25 | throw err; 26 | } 27 | 28 | req.userId = decodedToken.userId; 29 | next(); 30 | }; 31 | -------------------------------------------------------------------------------- /models/order.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const Schema = mongoose.Schema; 4 | 5 | const orderSchema = new Schema({ 6 | orderID: { 7 | type: String, 8 | required: true, 9 | }, 10 | items: [ 11 | { 12 | type: Schema.Types.ObjectId, 13 | ref: "Food", 14 | }, 15 | ], 16 | totalAmount: { 17 | type: Number, 18 | required: true, 19 | }, 20 | orderDate: { 21 | type: Date, 22 | }, 23 | paidThrough: { 24 | // COD// CARD // Net Banking // Google Pay 25 | type: String, 26 | }, 27 | paymentResponse: { 28 | // Bank or PG response with Transaction number Log for refund or enquiry 29 | type: String, 30 | }, 31 | orderStatus: { 32 | // waiting // preparing // onway // delivered // cancelled // failed 33 | type: String, 34 | }, 35 | }); 36 | 37 | module.exports = mongoose.model("Order", orderSchema); 38 | -------------------------------------------------------------------------------- /middlewares/adminAuth.js: -------------------------------------------------------------------------------- 1 | const jwt = require("jsonwebtoken"); 2 | const AppError = require("../controllers/errorController"); 3 | const User = require("../models/user"); 4 | const { APP_KEY } = require("../config/AppConst"); 5 | 6 | module.exports = (req, res, next) => { 7 | const { authorization } = req.headers; 8 | if (!authorization) { 9 | return AppError.unAuthorised(); 10 | } 11 | const token = authorization.replace("Bearer ", ""); 12 | 13 | jwt.verify(token, APP_KEY, async (err, payload) => { 14 | if (err) { 15 | return AppError.onError(res, "Authorization verification failed!"); 16 | } 17 | const { userId } = payload; 18 | User.findById(userId) 19 | .then((user) => { 20 | req.user = user; 21 | next(); 22 | }) 23 | .catch((err) => 24 | AppError.onError(res, "Authorization token is not valid") 25 | ); 26 | }); 27 | }; 28 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "food_order_backend", 3 | "version": "1.0.0", 4 | "description": "Food Order App Backend (Mobile App REST API and Admin Console Functionality)", 5 | "main": "app.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "nodemon app.js" 9 | }, 10 | "engines": { 11 | "node": "12.16.1", 12 | "npm": "6.13.4" 13 | }, 14 | "keywords": [ 15 | "Food", 16 | "Order", 17 | "App", 18 | "Backend" 19 | ], 20 | "author": "Jayanta Gogoi", 21 | "license": "ISC", 22 | "dependencies": { 23 | "bcrypt": "^4.0.1", 24 | "body-parser": "^1.19.0", 25 | "compression": "^1.7.4", 26 | "express": "^4.17.1", 27 | "express-validator": "^6.4.1", 28 | "helmet": "^3.22.0", 29 | "jsonwebtoken": "^8.5.1", 30 | "mongoose": "^5.9.7", 31 | "morgan": "^1.10.0", 32 | "nodemon": "^2.0.3" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | If you are seeing this page. Definately you are keen about the mechanism of Online Food Delivery System working. I am giving a rough overview through this project to make a simple product availability and consumer side how behaving while we try to access the RESTFul API's from Mobile or Web applications. 2 | 3 | This application is not covering the Admin part which is a saperate module with complete features to deliver admin and restaurant and Delivery agent section. 4 | 5 | The Missing Piece to run the application: 6 | 7 | 1. Mongo DB access through https://cloud.mongodb.com/ 8 | 2. User Credential which is encaptulated due to maintain Security. 9 | 10 | Create -> AppConst.js 11 | add the following: 12 | exports.MONGODB_URI ="mongodb+srv://your_mongodb_url/online_foods"; 13 | 14 | exports.APP_KEY = "APP_ACCESS_KEY"; 15 | 16 | The front End part is devided into two section Web App [REACT JS] and Mobile App [REACT NATIVE] you can find the front end source code in my repositoy list. 17 | 18 | Post Man COllections for API Testing Part: 19 | 20 | https://documenter.getpostman.com/view/8734310/Szt5fBTP?version=latest 21 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const express = require("express"); 3 | const mongoose = require("mongoose"); 4 | const bodyParser = require("body-parser"); 5 | const helmet = require("helmet"); // secure headers 6 | const compression = require("compression"); // compress assets 7 | const morgan = require("morgan"); // logging 8 | const { MONGODB_URI } = require("./config/AppConst"); 9 | 10 | /** 11 | * Controllers 12 | */ 13 | const AppError = require("./controllers/errorController"); 14 | 15 | /** 16 | * Routes 17 | */ 18 | const userRoutes = require("./routes/userRoutes"); 19 | const foodRoutes = require("./routes/foodsRoute"); 20 | const adminRoutes = require("./routes/adminRoutes"); 21 | 22 | const app = express(); 23 | 24 | /** 25 | * Database Connection 26 | */ 27 | mongoose 28 | .connect(MONGODB_URI, { 29 | useNewUrlParser: true, 30 | useCreateIndex: true, 31 | useUnifiedTopology: true, 32 | }) 33 | .then(() => {}) 34 | .catch((err) => { 35 | console.log(err); 36 | }); 37 | 38 | /** 39 | * Middlewares 40 | */ 41 | 42 | app.use(helmet()); 43 | app.use(compression()); 44 | app.use(bodyParser.json()); 45 | app.use("/images", express.static(path.join(__dirname, "images"))); 46 | 47 | app.use("/user", userRoutes); // --- User Acccess 48 | app.use("/food", foodRoutes); // -- Product Access 49 | app.use("/admin", adminRoutes); // --- Admin Access 50 | app.use(AppError.unAuthorised); // -- Error Handler 51 | 52 | app.use((error, req, res, next) => { 53 | const status = error.statusCode || 500; 54 | const data = error.data; 55 | res.status(status).json({ data: data }); 56 | }); 57 | 58 | const PORT = process.env.PORT || 8000; 59 | app.listen(PORT); 60 | -------------------------------------------------------------------------------- /routes/userRoutes.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const router = express.Router({ mergeParams: true }); 3 | const User = require("../models/user"); 4 | const userController = require("../controllers/userController"); 5 | const { body } = require("express-validator"); 6 | const auth = require("../middlewares/userAuth"); 7 | 8 | // SIGNUP 9 | router.post( 10 | "/signup", 11 | [ 12 | body("email") 13 | .isEmail() 14 | .withMessage("Please Enter a valid email ID") 15 | .custom((value, req) => { 16 | return User.findOne({ email: value }).then((userDoc) => { 17 | if (userDoc) { 18 | return Promise.reject("Email already Exist"); 19 | } 20 | }); 21 | }) 22 | .normalizeEmail(), 23 | body("password") 24 | .trim() 25 | .isLength({ min: 6 }) 26 | .withMessage("Your password whould have to atlest 6 Character long"), 27 | ], 28 | userController.onSignup 29 | ); 30 | 31 | router.post( 32 | "/login", 33 | [ 34 | body("email") 35 | .isEmail() 36 | .withMessage("Please Enter a valid email ID") 37 | .normalizeEmail(), 38 | body("password") 39 | .trim() 40 | .isLength({ min: 6 }) 41 | .withMessage("Please Enter a Valid Password!"), 42 | ], 43 | userController.onLogin 44 | ); 45 | 46 | router.put("/cart/:id/:qty", auth, userController.editCart); 47 | 48 | router.post("/cart/:id", auth, userController.addToCart); 49 | 50 | router.get("/cart", auth, userController.getCart); 51 | 52 | router.get("/order", auth, userController.getOrder); 53 | 54 | router.get("/order/:id", auth, userController.getSelectedOrder); 55 | 56 | router.post("/add-order", auth, userController.addOrder); 57 | 58 | router.get("/profile", auth, userController.viewProfile); 59 | 60 | router.post("/address", auth, userController.editAddress); 61 | 62 | module.exports = router; 63 | -------------------------------------------------------------------------------- /controllers/adminController.js: -------------------------------------------------------------------------------- 1 | const Food = require("../models/food"); 2 | const Restaurant = require("../models/restaurant"); 3 | const AppError = require("./errorController"); 4 | 5 | exports.addRestaurant = (req, res, next) => { 6 | const name = req.body.name; 7 | const foodType = req.body.foodType; 8 | const pincode = req.body.pincode; 9 | const address = req.body.address; 10 | const phone = req.body.phone; 11 | 12 | const restaurant = new Restaurant({ 13 | name: name, 14 | foodType: foodType, 15 | pincode: pincode, 16 | address: address, 17 | phone: phone, 18 | }); 19 | 20 | restaurant 21 | .save() 22 | .then((restaurant) => { 23 | return res.json(restaurant); 24 | }) 25 | .catch((err) => { 26 | return AppError.onError(res, "restaurant add error" + err); 27 | }); 28 | }; 29 | 30 | exports.viewAllRestaurant = (req, res, next) => { 31 | Restaurant.find() 32 | .then((restaurants) => { 33 | res.status(200).json(restaurants); 34 | }) 35 | .catch((err) => { 36 | return AppError.onError(res, "restaurant add error" + err); 37 | }); 38 | }; 39 | 40 | exports.addFood = (req, res, next) => { 41 | const restaurantId = req.params.id; 42 | const name = req.body.name; 43 | const description = req.body.description; 44 | const category = req.body.category; 45 | const price = req.body.price; 46 | const readyTime = req.body.readyTime; 47 | 48 | let currentRestaurant; 49 | 50 | Restaurant.findById(restaurantId) 51 | .then((restaurant) => { 52 | currentRestaurant = restaurant; 53 | let food = new Food({ 54 | name: name, 55 | description: description, 56 | category: category, 57 | rating: 0, 58 | price: price, 59 | images: [], 60 | readyTime: readyTime, 61 | }); 62 | 63 | return food.save(); 64 | }) 65 | .then((food) => { 66 | currentRestaurant.foods.push(food); 67 | return currentRestaurant.save(); 68 | }) 69 | .then((result) => { 70 | return res.status(200).json(result); 71 | }) 72 | .catch((err) => { 73 | err.statusCode = 503; 74 | next(err); 75 | }); 76 | }; 77 | -------------------------------------------------------------------------------- /models/user.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const Schema = mongoose.Schema; 4 | 5 | const userSchema = new Schema({ 6 | email: { 7 | type: String, 8 | required: true, 9 | }, 10 | password: { 11 | type: String, 12 | required: true, 13 | }, 14 | firstName: { 15 | type: String, 16 | }, 17 | lastName: { 18 | type: String, 19 | }, 20 | address: { 21 | type: String, 22 | }, 23 | phone: { 24 | type: String, 25 | }, 26 | lat: { 27 | type: Number, 28 | }, 29 | lng: { 30 | type: Number, 31 | }, 32 | cart: [ 33 | { 34 | food: { type: Schema.Types.ObjectId, ref: "Food", required: true }, 35 | qty: { type: Number, required: true }, 36 | }, 37 | ], 38 | order: [ 39 | { 40 | type: Schema.Types.ObjectId, 41 | ref: "Order", 42 | }, 43 | ], 44 | }); 45 | 46 | userSchema.methods.addToCart = function (foodItem) { 47 | const foodIndex = this.cart.findIndex((cf) => { 48 | return cf.food._id.toString() === foodItem._id.toString(); 49 | }); 50 | 51 | let updatedItems = [...this.cart]; 52 | let newQty = 1; 53 | if (foodIndex >= 0) { 54 | newQty = this.cart[foodIndex].qty + 1; 55 | updatedItems[foodIndex].qty = newQty; 56 | } else { 57 | updatedItems.push({ 58 | food: foodItem, 59 | qty: newQty, 60 | }); 61 | } 62 | this.cart = updatedItems; 63 | return this.save(); 64 | }; 65 | 66 | userSchema.methods.editCart = function (foodItem, newQty) { 67 | const foodIndex = this.cart.findIndex((cf) => { 68 | return cf.food._id.toString() === foodItem._id.toString(); 69 | }); 70 | 71 | if (newQty < 1) { 72 | const updatedItems = this.cart.filter((cf) => { 73 | return cf.food._id.toString() !== foodItem._id.toString(); 74 | }); 75 | this.cart = updatedItems; 76 | return this.save(); 77 | } else { 78 | if (foodIndex >= 0) { 79 | let updatedItems = [...this.cart]; 80 | updatedItems[foodIndex].qty = newQty; 81 | 82 | this.cart = updatedItems; 83 | return this.save(); 84 | } else { 85 | return new Promise.reject(); 86 | } 87 | } 88 | }; 89 | 90 | module.exports = mongoose.model("User", userSchema); 91 | -------------------------------------------------------------------------------- /controllers/foodController.js: -------------------------------------------------------------------------------- 1 | const AppError = require("./errorController"); 2 | const Food = require("../models/food"); 3 | const Restaurant = require("../models/restaurant"); 4 | 5 | const ITEM_PER_PAGE = 50; 6 | /** 7 | * PUBLIC ACCESS 8 | */ 9 | 10 | exports.getAvailableFoods = (req, res, next) => { 11 | const page = +req.query.page || 1; 12 | let totalFoods; 13 | Food.find() 14 | .countDocuments() 15 | .then((numbersOfFoods) => { 16 | totalFoods = numbersOfFoods; 17 | return Food.find() 18 | .skip((page - 1) * ITEM_PER_PAGE) 19 | .limit(ITEM_PER_PAGE); 20 | }) 21 | .then((foods) => { 22 | return res.status(200).json(foods); 23 | }) 24 | .catch((err) => { 25 | err.statusCode = 503; 26 | next(err); 27 | }); 28 | }; 29 | 30 | /** 31 | * Get Top 10 restaurants in specified Area 32 | */ 33 | exports.getTopRestaurants = (req, res, next) => { 34 | Restaurant.find() 35 | .populate("foods") 36 | .then((result) => { 37 | res.status(200).json(result); 38 | }) 39 | .catch((err) => { 40 | return AppError.onError(res, "restaurant add error" + err); 41 | }); 42 | }; 43 | 44 | exports.getAllFoodsFromRestaurant = (req, res, next) => { 45 | const restaurantId = req.params.id; 46 | Restaurant.findById(restaurantId) 47 | .populate("foods") 48 | .then((result) => { 49 | res.status(200).json(result); 50 | }) 51 | .catch((err) => { 52 | err.statusCode = 503; 53 | next(err); 54 | }); 55 | }; 56 | 57 | exports.getFoodDetails = (req, res, next) => { 58 | const foodId = req.params.id; 59 | Food.findById(foodId) 60 | .then((result) => { 61 | res.status(200).json(result); 62 | }) 63 | .catch((err) => { 64 | err.statusCode = 503; 65 | next(err); 66 | }); 67 | }; 68 | 69 | exports.getInThirtyMinutes = (req, res, next) => { 70 | const page = +req.query.page || 1; 71 | let totalFoods; 72 | Food.find({ readyTime: { $lt: 31 } }) 73 | .countDocuments() 74 | .then((numbersOfFoods) => { 75 | totalFoods = numbersOfFoods; 76 | return Food.find({ readyTime: { $lt: 31 } }) 77 | .skip((page - 1) * ITEM_PER_PAGE) 78 | .limit(ITEM_PER_PAGE); 79 | }) 80 | .then((foods) => { 81 | return res.status(200).json(foods); 82 | }) 83 | .catch((err) => { 84 | err.statusCode = 503; 85 | next(err); 86 | }); 87 | }; 88 | -------------------------------------------------------------------------------- /controllers/userController.js: -------------------------------------------------------------------------------- 1 | const jwt = require("jsonwebtoken"); 2 | const bcrypt = require("bcrypt"); 3 | const AppError = require("./errorController"); 4 | const { APP_KEY } = require("../config/AppConst"); 5 | const { validationResult } = require("express-validator"); 6 | 7 | const User = require("../models/user"); 8 | const Food = require("../models/food"); 9 | const Order = require("../models/order"); 10 | 11 | exports.onSignup = (req, res, next) => { 12 | const errors = validationResult(req); 13 | 14 | if (!errors.isEmpty()) { 15 | const err = new Error("Validation Erro"); 16 | err.statusCode = 422; 17 | err.data = errors.array(); 18 | next(err); 19 | return; 20 | } 21 | 22 | let email = req.body.email; 23 | let password = req.body.password; 24 | let firstName = req.body.firstName; 25 | let lastName = req.body.lastName; 26 | 27 | bcrypt 28 | .hash(password, 12) 29 | .then((hashPassword) => { 30 | const user = new User({ 31 | email: email, 32 | password: hashPassword, 33 | firstName: firstName, 34 | lastName: lastName, 35 | address: null, 36 | phone: null, 37 | lat: null, 38 | lng: null, 39 | cart: [], 40 | order: [], 41 | }); 42 | 43 | return user.save(); 44 | }) 45 | .then((user) => { 46 | const token = jwt.sign( 47 | { userId: user._id.toString(), email: user.email }, 48 | APP_KEY, 49 | { expiresIn: "90d" } 50 | ); 51 | 52 | res.status(200).json(token); 53 | }) 54 | .catch((err) => { 55 | if (!err.statusCode) { 56 | err.statusCode = 500; 57 | } 58 | next(err); 59 | }); 60 | }; 61 | 62 | exports.onForgotPassword = (req, res, next) => {}; 63 | 64 | exports.onLogin = (req, res, next) => { 65 | const errors = validationResult(req); 66 | 67 | if (!errors.isEmpty()) { 68 | const err = new Error("Validation Erro"); 69 | err.statusCode = 422; 70 | err.data = errors.array(); 71 | throw err; 72 | } 73 | 74 | let email = req.body.email; 75 | let password = req.body.password; 76 | let loginUser = null; 77 | User.findOne({ email: email }) 78 | .then((user) => { 79 | if (!user) { 80 | const err = new Error("User Does not exist with the provided email ID"); 81 | err.statusCode = 401; 82 | throw err; 83 | } 84 | loginUser = user; 85 | return bcrypt.compare(password, user.password); 86 | }) 87 | .then((result) => { 88 | if (!result) { 89 | const err = new Error("Passwod does not match!"); 90 | err.statusCode = 401; 91 | throw err; 92 | } 93 | 94 | const token = jwt.sign( 95 | { userId: loginUser._id.toString(), email: loginUser.email }, 96 | APP_KEY, 97 | { expiresIn: "90d" } 98 | ); 99 | 100 | res.status(200).json(token); 101 | }) 102 | .catch((err) => { 103 | if (!err.statusCode) { 104 | err.statusCode = 500; 105 | } 106 | next(err); 107 | }); 108 | }; 109 | 110 | exports.getCart = (req, res, next) => { 111 | const userId = req.userId; 112 | 113 | User.findById(userId) 114 | .populate("cart.food") 115 | .then((user) => { 116 | res.status(200).json(user.cart); 117 | }) 118 | .catch((err) => { 119 | if (!err.statusCode) { 120 | err.statusCode = 500; 121 | } 122 | next(err); 123 | }); 124 | }; 125 | 126 | exports.addToCart = (req, res, next) => { 127 | const userId = req.userId; 128 | const foodId = req.params.id; 129 | 130 | console.log("Going through"); 131 | 132 | let currentUser; 133 | User.findById(userId) 134 | .populate("cart.food") 135 | .then((user) => { 136 | currentUser = user; 137 | return Food.findById(foodId); 138 | }) 139 | .then((food) => { 140 | return currentUser.addToCart(food); 141 | }) 142 | .then((result) => { 143 | res.status(200).json(result.cart); 144 | }) 145 | .catch((err) => { 146 | if (!err.statusCode) { 147 | err.statusCode = 500; 148 | } 149 | next(err); 150 | }); 151 | }; 152 | 153 | exports.editCart = (req, res, next) => { 154 | const userId = req.userId; 155 | const foodId = req.params.id; 156 | const qty = req.params.qty; 157 | 158 | let currentUser; 159 | User.findById(userId) 160 | .populate("cart.food") 161 | .then((user) => { 162 | currentUser = user; 163 | return Food.findById(foodId); 164 | }) 165 | .then((food) => { 166 | return currentUser.editCart(food, qty); 167 | }) 168 | .then((result) => { 169 | res.status(200).json(result.cart); 170 | }) 171 | .catch((err) => { 172 | if (!err.statusCode) { 173 | err.statusCode = 500; 174 | } 175 | next(err); 176 | }); 177 | }; 178 | 179 | exports.getOrder = (req, res, next) => { 180 | const userId = req.userId; 181 | 182 | User.findById(userId) 183 | .populate("order") 184 | .then((user) => { 185 | res.status(200).json(user.order); 186 | }) 187 | .catch((err) => { 188 | if (!err.statusCode) { 189 | err.statusCode = 500; 190 | } 191 | next(err); 192 | }); 193 | }; 194 | 195 | exports.getSelectedOrder = (req, res, next) => { 196 | const orderId = req.params.id; 197 | 198 | Order.findById(orderId) 199 | .populate("items") 200 | .then((order) => { 201 | res.status(200).json(order); 202 | }) 203 | .catch((err) => { 204 | if (!err.statusCode) { 205 | err.statusCode = 500; 206 | } 207 | next(err); 208 | }); 209 | }; 210 | 211 | exports.addOrder = (req, res, next) => { 212 | const userId = req.userId; 213 | const orderId = `${Math.floor(Math.random() * 89999 + 1000)}`; 214 | let currentUser; 215 | let total = 0; 216 | User.findById(userId) 217 | .populate("order") 218 | .populate("cart.food") 219 | .then((user) => { 220 | currentUser = user; 221 | let orderedItems = []; 222 | user.cart.map((item) => { 223 | let qty = item.qty; 224 | let price = item.food.price; 225 | total += qty * price; 226 | orderedItems.push(item.food); 227 | }); 228 | 229 | let order = new Order({ 230 | orderID: orderId, 231 | items: orderedItems, 232 | totalAmount: total, 233 | orderDate: new Date(), 234 | paidThrough: "", 235 | paymentResponse: "", 236 | orderStatus: "waiting", 237 | }); 238 | return order.save(); 239 | }) 240 | .then((order) => { 241 | currentUser.order.push(order); 242 | currentUser.cart = []; 243 | return currentUser.save(); 244 | }) 245 | .then((result) => res.status(200).json(result.order)) 246 | .catch((err) => { 247 | if (!err.statusCode) { 248 | err.statusCode = 500; 249 | } 250 | next(err); 251 | }); 252 | }; 253 | 254 | exports.viewProfile = (req, res, next) => { 255 | const userId = req.userId; 256 | 257 | User.findById(userId) 258 | .select("-password") 259 | .then((user) => { 260 | res.status(200).json(user); 261 | }) 262 | .catch((err) => { 263 | if (!err.statusCode) { 264 | err.statusCode = 500; 265 | } 266 | next(err); 267 | }); 268 | }; 269 | 270 | exports.editAddress = (req, res, next) => { 271 | const userId = req.userId; 272 | const address = req.body.address; 273 | const lat = req.body.lat; 274 | const lng = req.body.lng; 275 | const phone = req.body.phone; 276 | 277 | User.findById(userId) 278 | .select("-password") 279 | .then((user) => { 280 | user.address = address; 281 | user.phone = phone; 282 | user.lat = lat; 283 | user.lng = lng; 284 | return user.save(); 285 | }) 286 | .then((result) => { 287 | res.status(200).json(result); 288 | }) 289 | .catch((err) => { 290 | if (!err.statusCode) { 291 | err.statusCode = 500; 292 | } 293 | next(err); 294 | }); 295 | }; 296 | -------------------------------------------------------------------------------- /access.log: -------------------------------------------------------------------------------- 1 | ::1 - - [17/May/2020:07:45:17 +0000] "POST /signup HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 2 | ::1 - - [17/May/2020:07:45:50 +0000] "POST /user/signup HTTP/1.1" 422 760 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 3 | ::1 - - [17/May/2020:07:46:59 +0000] "POST /user/signup HTTP/1.1" 422 760 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 4 | ::1 - - [17/May/2020:07:49:51 +0000] "POST /user/signup HTTP/1.1" 422 234 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 5 | ::1 - - [17/May/2020:07:50:10 +0000] "POST /user/signup HTTP/1.1" 422 234 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 6 | ::1 - - [17/May/2020:07:51:22 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 7 | ::1 - - [17/May/2020:07:51:52 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 8 | ::1 - - [17/May/2020:07:52:37 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 9 | ::1 - - [17/May/2020:07:52:56 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 10 | ::1 - - [17/May/2020:07:53:38 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 11 | ::1 - - [17/May/2020:07:54:10 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 12 | ::1 - - [17/May/2020:07:54:11 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 13 | ::1 - - [17/May/2020:07:55:41 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 14 | ::1 - - [17/May/2020:07:57:43 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 15 | ::1 - - [17/May/2020:07:57:58 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 16 | ::1 - - [17/May/2020:07:58:14 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 17 | ::1 - - [17/May/2020:08:00:09 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 18 | ::1 - - [17/May/2020:08:00:10 +0000] "POST /user/signup HTTP/1.1" 422 206 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 19 | ::1 - - [17/May/2020:08:05:57 +0000] "POST /user/signup HTTP/1.1" 201 66 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 20 | ::1 - - [17/May/2020:08:09:35 +0000] "POST /user/signup HTTP/1.1" 200 211 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 21 | ::1 - - [17/May/2020:08:09:57 +0000] "POST /user/signup HTTP/1.1" 422 126 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 22 | ::1 - - [17/May/2020:08:10:10 +0000] "POST /user/signup HTTP/1.1" 200 213 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 23 | ::1 - - [17/May/2020:08:13:04 +0000] "POST /user/signup HTTP/1.1" 200 213 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 24 | ::1 - - [17/May/2020:08:13:04 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 25 | ::1 - - [17/May/2020:08:15:41 +0000] "POST /user/signup HTTP/1.1" 200 213 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 26 | ::1 - - [17/May/2020:08:16:07 +0000] "POST /user/signup HTTP/1.1" 200 213 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 27 | ::1 - - [17/May/2020:08:16:07 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 28 | ::1 - - [17/May/2020:08:17:34 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 29 | ::1 - - [17/May/2020:08:17:56 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 30 | ::1 - - [17/May/2020:08:18:01 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 31 | ::1 - - [17/May/2020:08:19:46 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 32 | ::1 - - [17/May/2020:08:21:22 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 33 | ::1 - - [17/May/2020:08:21:57 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 34 | ::1 - - [17/May/2020:08:22:47 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 35 | ::1 - - [17/May/2020:08:22:55 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 36 | ::1 - - [17/May/2020:08:24:08 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 37 | ::1 - - [17/May/2020:08:25:18 +0000] "POST /user/signup HTTP/1.1" 422 98 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 38 | ::1 - - [17/May/2020:08:26:17 +0000] "POST /user/login HTTP/1.1" 200 210 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 39 | ::1 - - [17/May/2020:08:26:17 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 40 | ::1 - - [17/May/2020:08:32:45 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 41 | ::1 - - [17/May/2020:08:32:49 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 42 | ::1 - - [17/May/2020:08:32:58 +0000] "GET /shop HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 43 | ::1 - - [17/May/2020:08:33:13 +0000] "GET /food HTTP/1.1" 200 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 44 | ::1 - - [17/May/2020:08:33:17 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 45 | ::1 - - [17/May/2020:08:34:03 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 46 | ::1 - - [17/May/2020:10:21:58 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 47 | ::1 - - [17/May/2020:10:23:08 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 48 | ::1 - - [17/May/2020:10:23:28 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 49 | ::1 - - [17/May/2020:10:24:09 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 50 | ::1 - - [17/May/2020:10:24:26 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 51 | ::1 - - [17/May/2020:10:25:05 +0000] "GET /top-restaurants HTTP/1.1" 403 69 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 52 | ::1 - - [17/May/2020:10:25:06 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 53 | ::1 - - [17/May/2020:10:26:52 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 54 | ::1 - - [17/May/2020:10:27:33 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 55 | ::1 - - [17/May/2020:10:28:26 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 56 | ::1 - - [17/May/2020:10:28:48 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 57 | ::1 - - [17/May/2020:10:31:06 +0000] "GET /admin/view-restaurants HTTP/1.1" 200 922 "-" "PostmanRuntime/7.24.1" 58 | ::1 - - [17/May/2020:10:32:23 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 59 | ::1 - - [17/May/2020:10:32:59 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 60 | ::1 - - [17/May/2020:10:34:15 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 61 | ::1 - - [17/May/2020:10:34:55 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 62 | ::1 - - [17/May/2020:10:35:07 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 63 | ::1 - - [17/May/2020:10:35:08 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 64 | ::1 - - [17/May/2020:10:36:49 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 65 | ::1 - - [17/May/2020:10:36:50 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 66 | ::1 - - [17/May/2020:10:37:01 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 67 | ::1 - - [17/May/2020:10:37:16 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 68 | ::1 - - [17/May/2020:10:37:17 +0000] "GET /favicon.ico HTTP/1.1" 403 69 "http://localhost:8000/food/top-restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 69 | ::1 - - [17/May/2020:10:38:58 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 70 | ::1 - - [17/May/2020:10:39:38 +0000] "GET /food/top HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 71 | ::1 - - [17/May/2020:10:39:38 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 72 | ::1 - - [17/May/2020:10:39:40 +0000] "GET /food/top HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 73 | ::1 - - [17/May/2020:10:39:40 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 74 | ::1 - - [17/May/2020:10:39:42 +0000] "GET /food/top HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 75 | ::1 - - [17/May/2020:10:39:42 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 76 | ::1 - - [17/May/2020:10:39:44 +0000] "GET /food/top HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 77 | ::1 - - [17/May/2020:10:39:44 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 78 | ::1 - - [17/May/2020:10:39:49 +0000] "GET /food/top HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 79 | ::1 - - [17/May/2020:10:39:49 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 80 | ::1 - - [17/May/2020:10:41:00 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 81 | ::1 - - [17/May/2020:10:42:38 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 82 | ::1 - - [17/May/2020:10:42:42 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "PostmanRuntime/7.24.1" 83 | ::1 - - [17/May/2020:10:43:12 +0000] "GET /food/top-restaurants HTTP/1.1" 200 24 "-" "PostmanRuntime/7.24.1" 84 | ::1 - - [17/May/2020:10:43:51 +0000] "GET /food/top-restaurants HTTP/1.1" 200 24 "-" "PostmanRuntime/7.24.1" 85 | ::1 - - [17/May/2020:10:43:52 +0000] "GET /food/top-restaurants HTTP/1.1" 200 24 "-" "PostmanRuntime/7.24.1" 86 | ::1 - - [17/May/2020:10:43:53 +0000] "GET /food/top-restaurants HTTP/1.1" 200 24 "-" "PostmanRuntime/7.24.1" 87 | ::1 - - [17/May/2020:10:44:05 +0000] "GET /food/top-restaurants HTTP/1.1" 200 24 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 88 | ::1 - - [17/May/2020:10:44:05 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top-restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 89 | ::1 - - [17/May/2020:10:51:36 +0000] "GET /food HTTP/1.1" 200 24 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 90 | ::1 - - [17/May/2020:10:51:36 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 91 | ::1 - - [17/May/2020:10:51:42 +0000] "GET /food/top-restaurants HTTP/1.1" 304 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 92 | ::1 - - [17/May/2020:10:51:42 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top-restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 93 | ::1 - - [17/May/2020:10:52:04 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 94 | ::1 - - [17/May/2020:10:52:04 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top-restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 95 | ::1 - - [17/May/2020:10:52:52 +0000] "GET /admin/view-restaurants HTTP/1.1" 200 922 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 96 | ::1 - - [17/May/2020:10:52:53 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/admin/view-restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 97 | ::1 - - [17/May/2020:10:54:16 +0000] "GET /food/top-restaurants HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 98 | ::1 - - [17/May/2020:10:54:16 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top-restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 99 | ::1 - - [17/May/2020:10:55:12 +0000] "GET /food/ HTTP/1.1" - - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 100 | ::1 - - [17/May/2020:10:55:14 +0000] "GET /food/ HTTP/1.1" 200 922 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 101 | ::1 - - [17/May/2020:10:55:14 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 102 | ::1 - - [17/May/2020:10:55:38 +0000] "GET /food/ HTTP/1.1" 200 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 103 | ::1 - - [17/May/2020:10:55:39 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 104 | ::1 - - [17/May/2020:10:56:02 +0000] "GET /food/restaurants HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 105 | ::1 - - [17/May/2020:10:56:02 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 106 | ::1 - - [17/May/2020:10:56:27 +0000] "GET /food/restaurants HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 107 | ::1 - - [17/May/2020:10:56:28 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 108 | ::1 - - [17/May/2020:10:56:30 +0000] "GET /food/restaurants HTTP/1.1" 503 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 109 | ::1 - - [17/May/2020:10:56:30 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 110 | ::1 - - [17/May/2020:10:56:54 +0000] "GET /food/top/restaurants HTTP/1.1" 200 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 111 | ::1 - - [17/May/2020:10:56:55 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top/restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 112 | ::1 - - [17/May/2020:10:57:21 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 113 | ::1 - - [17/May/2020:10:57:22 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top/restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 114 | ::1 - - [17/May/2020:10:59:25 +0000] "GET /top-restaurants HTTP/1.1" 401 45 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 115 | ::1 - - [17/May/2020:10:59:25 +0000] "GET /food HTTP/1.1" 200 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 116 | ::1 - - [17/May/2020:10:59:28 +0000] "GET /food/top/restaurants HTTP/1.1" 200 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 117 | ::1 - - [17/May/2020:10:59:29 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 118 | ::1 - - [17/May/2020:10:59:55 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 119 | ::1 - - [17/May/2020:10:59:55 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 120 | ::1 - - [17/May/2020:11:02:51 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 121 | ::1 - - [17/May/2020:11:02:51 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 122 | ::1 - - [17/May/2020:11:02:57 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 123 | ::1 - - [17/May/2020:11:02:57 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 124 | ::1 - - [17/May/2020:11:03:17 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 125 | ::1 - - [17/May/2020:11:03:17 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 126 | ::1 - - [17/May/2020:11:03:44 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 127 | ::1 - - [17/May/2020:11:03:44 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 128 | ::1 - - [17/May/2020:11:03:51 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 129 | ::1 - - [17/May/2020:11:03:51 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 130 | ::1 - - [17/May/2020:11:04:25 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 131 | ::1 - - [17/May/2020:11:04:25 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 132 | ::1 - - [17/May/2020:11:05:06 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 133 | ::1 - - [17/May/2020:11:05:06 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 134 | ::1 - - [17/May/2020:11:05:13 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 135 | ::1 - - [17/May/2020:11:05:13 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 136 | ::1 - - [17/May/2020:11:05:46 +0000] "GET /food/top/restaurants HTTP/1.1" - - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 137 | ::1 - - [17/May/2020:11:05:46 +0000] "GET /food HTTP/1.1" - - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 138 | ::1 - - [17/May/2020:11:05:48 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 139 | ::1 - - [17/May/2020:11:05:48 +0000] "GET /food HTTP/1.1" 200 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 140 | ::1 - - [17/May/2020:11:06:05 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 141 | ::1 - - [17/May/2020:11:06:05 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 142 | ::1 - - [17/May/2020:11:06:18 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 143 | ::1 - - [17/May/2020:11:06:18 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 144 | ::1 - - [17/May/2020:11:06:59 +0000] "GET /food/top/restaurants HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 145 | ::1 - - [17/May/2020:11:06:59 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 146 | ::1 - - [17/May/2020:11:29:08 +0000] "GET /food/top/restaurants HTTP/1.1" 200 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 147 | ::1 - - [17/May/2020:11:29:08 +0000] "GET /food HTTP/1.1" 304 - "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 148 | ::1 - - [17/May/2020:11:29:26 +0000] "GET /food/top/restaurants HTTP/1.1" 200 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 149 | ::1 - - [17/May/2020:11:29:26 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/food/top/restaurants" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 150 | ::1 - - [17/May/2020:11:30:07 +0000] "GET /images/punjab-grill.jpg HTTP/1.1" 401 45 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 151 | ::1 - - [17/May/2020:11:30:07 +0000] "GET /images/yellow_chilli.jpg HTTP/1.1" 401 45 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 152 | ::1 - - [17/May/2020:11:30:07 +0000] "GET /images/rest_3.jpg HTTP/1.1" 401 45 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 153 | ::1 - - [17/May/2020:11:30:07 +0000] "GET /images/res_4.jpg HTTP/1.1" 401 45 "-" "Expo/2.15.3.10122 CFNetwork/1121.2.1 Darwin/19.4.0" 154 | ::1 - - [17/May/2020:11:32:44 +0000] "GET /images/res_4.jpg HTTP/1.1" 401 45 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 155 | ::1 - - [17/May/2020:11:32:45 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/images/res_4.jpg" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 156 | ::1 - - [17/May/2020:11:32:52 +0000] "GET /images/res_4.jpg HTTP/1.1" 401 45 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 157 | ::1 - - [17/May/2020:11:32:52 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/images/res_4.jpg" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 158 | ::1 - - [17/May/2020:11:33:27 +0000] "GET /images/res_4.jpg HTTP/1.1" 401 45 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 159 | ::1 - - [17/May/2020:11:33:28 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/images/res_4.jpg" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 160 | ::1 - - [17/May/2020:11:34:51 +0000] "GET /images/res_4.jpg HTTP/1.1" 401 45 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 161 | ::1 - - [17/May/2020:11:34:51 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/images/res_4.jpg" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 162 | ::1 - - [17/May/2020:11:36:20 +0000] "GET /images/res_4.jpg HTTP/1.1" 401 45 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 163 | ::1 - - [17/May/2020:11:36:20 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/images/res_4.jpg" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 164 | ::1 - - [17/May/2020:11:36:22 +0000] "GET /images/res_4.jpg HTTP/1.1" 401 45 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 165 | ::1 - - [17/May/2020:11:36:23 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/images/res_4.jpg" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 166 | ::1 - - [17/May/2020:11:36:26 +0000] "GET /images HTTP/1.1" 301 179 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 167 | ::1 - - [17/May/2020:11:36:26 +0000] "GET /images/ HTTP/1.1" 401 45 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 168 | ::1 - - [17/May/2020:11:36:26 +0000] "GET /favicon.ico HTTP/1.1" 401 45 "http://localhost:8000/images/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" 169 | --------------------------------------------------------------------------------