Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dishes controller, swagger and tests added. #92

Merged
merged 3 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ SECRET_KEY=2ab8c214a802d63ea27a2e20c58a691132dc2e8b8af83a68455d1f8dc714cb3c
FAPP_CLIENT_ID=3255776601380552
FAPP_CLIENT_SECRET=25b3a3c501e68392613935992ffdcd5a

FIREBASE_API_KEY=AIzaSyDbblVS1ll9P29eVEU5wNzM7VNuXRgsHc
FIREBASE_AUTH_DOMAIN=localeats-8315f.firebaseapp.com
FIREBASE_PROJECT_ID=localeats-8315f
FIREBASE_STORAGE_BUCKET=localeats-8315f.appspot.com
FIREBASE_MESSAGING_SENDER_ID=511061006027
FIREBASE_APP_ID=1:511061006027:web:9ed85cdc226bf4586c2d4e
FIREBASE_TYPE=service_account
FIREBASE_PROJECT_ID=localeats-55552
FIREBASE_PRIVATE_KEY_ID=ecd5bdecf0313ba44b153408f833e4ddd780444c
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDCqGRgesQ2hjFZ\ng5Q9/nr7aGJI+HtYu1Ag78XVoG+1AsJfqrdQ6nrNhrqq6ZIFTRcOvzE3k8nCAI3Y\nEYjvEvT55WAbJEuq/iLhhrQ5rJuq6HT1Vu0j2zXrrwFdWFaANhr0otK3GYj+BAB+\nYtHgJ7JGCY1PTTCYRgq115yZt9s3EXv9LqKcptWtXMdyGlhBaDoVLE7ELdGf7hjF\nMdfL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2ZGdghr0eBJvv2wKvF4eZaB1owh\nxFbYENjFdBKIndF345gu5LKQIRLd9z6lYrZlU1469/wO99EsQTpl/Wq+UDrD/BuK\nul/Vb5JPD6DifF9nXzkAadFPfCd61s6zthBm49nbAoGAIU8iEMnMWaZ7RVkgim6Q\nnQ+OAwswYW5oX43L9yKK8VAbhL+BS8eMokzU50EW8bWkVeY5iq6CO2IkQgbF7sFu\nsQKnMf8O3SKQQIVDy4hY/feEm2CGJZz9Oc5kCd2FnEPBn2w1HbtLxuW+BJDrdzOp\nyN4OytfuxIIjrs2nUVxZlcg=\n-----END PRIVATE KEY-----\n"
FIREBASE_CLIENT_EMAIL=firebase-adminsdk-txuvl@localeats-55552.iam.gserviceaccount.com
FIREBASE_CLIENT_ID=113082151868270524311
FIREBASE_AUTH_URI=https://accounts.google.com/o/oauth2/auth
FIREBASE_TOKEN_URI=https://oauth2.googleapis.com/token
FIREBASE_AUTH_PROVIDER_X509_CERT_URL=https://www.googleapis.com/oauth2/v1/certs
FIREBASE_CLIENT_X509_CERT_URL=https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-txuvl%40localeats-55552.iam.gserviceaccount.com

[email protected]
EMAIL_PASSWORD=gtoeajfhmcfkztdb

EMAIL_PASSWORD=gtoeajfhmcfkztdb
92 changes: 91 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"postinstall": "husky install && husky add .husky/pre-commit \"yarn validate-staged\" && husky add .husky/pre-push \"yarn test\""
},
"dependencies": {
"@firebase/storage": "^0.11.2",
"@google-cloud/storage": "^6.12.0",
"bcryptjs": "^2.4.3",
"chai": "^4.3.7",
Expand All @@ -25,6 +26,7 @@
"express-validator": "^7.0.1",
"firebase": "^10.1.0",
"firebase-admin": "^11.10.1",
"fs": "^0.0.1-security",
"jsonwebtoken": "^9.0.1",
"mongodb": "^5.0.17",
"mongoose": "^7.3.1",
Expand Down
12 changes: 8 additions & 4 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
require('dotenv').config();
const express = require('express');
const passport = require('passport');
const connectToMongo = require('./db/connection');
const cookieParser = require('cookie-parser');
require('./middleware/passport-setup');
const apiRoutes = require('./routes');
const swaggerJsdoc = require('swagger-jsdoc');
const swaggerUi = require('swagger-ui-express');
const connectToMongo = require('./db/connection');
const apiRoutes = require('./routes');

const app = express();
const port = 3001;
Expand Down Expand Up @@ -58,7 +58,12 @@ const options = {
],
},

apis: ['src/routes/cart.js', 'src/routes/sign.js', 'src/routes/users.js'],
apis: [
'src/routes/dishes.js',
'src/routes/cart.js',
'src/routes/sign.js',
'src/routes/users.js',
],
};

const specs = swaggerJsdoc(options);
Expand All @@ -70,7 +75,6 @@ app.use(

app.listen(port, () => {
console.log(`Server is running on port ${port}`);

});

module.exports = app;
Loading
Loading