Skip to content

Commit

Permalink
connected to database
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth Patil authored and Siddharth Patil committed Nov 10, 2023
1 parent 4ffc9af commit 0ed9a53
Show file tree
Hide file tree
Showing 5 changed files with 441 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.env
10 changes: 10 additions & 0 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
import express from 'express';
import mongoose from 'mongoose';
import dotenv from 'dotenv';
dotenv.config()

mongoose.connect(process.env.MONGO).then(() =>{
console.log("Connected to MongoDB!");
}).catch((err) =>{
console.log(err)
})


const app = express();

Expand Down
24 changes: 24 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
Loading

0 comments on commit 0ed9a53

Please sign in to comment.