forked from VanshKing30/FoodiesWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc01f15
commit f7fbd73
Showing
6 changed files
with
174 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
PORT=4000 | ||
DATABASE_URL="" | ||
JWT_SECRET="32 long character" | ||
CLOUDINARY_CLOUD_NAME="" | ||
CLOUDINARY_API_KEY="" | ||
CLOUDINARY_API_SECRET="" | ||
GOOGLE_CLIENT_ID= | ||
GOOGLE_CLIENT_SECRET="" | ||
SESSION_SECRET= | ||
EMAIL_USER="" | ||
EMAIL_PASS="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
const mongoose = require('mongoose'); | ||
const mongoose = require("mongoose"); | ||
|
||
const contactSchema = new mongoose.Schema({ | ||
name: { type: String, required: true }, | ||
email: { type: String, required: true }, | ||
message: { type: String, required: true }, | ||
const ContactSchema = new mongoose.Schema({ | ||
name: { | ||
type: String, | ||
required: true, | ||
}, | ||
email: { | ||
type: String, | ||
required: true, | ||
}, | ||
message: { | ||
type: String, | ||
required: true, | ||
}, | ||
createdAt: { | ||
type: Date, | ||
default: Date.now, | ||
}, | ||
}); | ||
|
||
const Contact = mongoose.model('Contact', contactSchema); | ||
const Contact = mongoose.model("Contact", ContactSchema); | ||
|
||
module.exports = Contact; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ const router = express.Router(); | |
|
||
router.post('/', saveContactMessage); | ||
|
||
|
||
module.exports = router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters