Skip to content

Commit

Permalink
create a script for seeding the database
Browse files Browse the repository at this point in the history
  • Loading branch information
Babali42 committed Dec 22, 2024
1 parent f4857f7 commit b518807
Show file tree
Hide file tree
Showing 5 changed files with 770 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/database-seed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
9 changes: 9 additions & 0 deletions backend/database-seed/database-seed-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Seed Database Tutorial (Windows)

Run powershell : ``powershell``

Create an environment varible in powershell : ``$Env:DATABASE_CONNECTION_STRING = "value"``

Go to script folder : ``cd \backend\mongoDB\``

Run script : ``node seed.js``
159 changes: 159 additions & 0 deletions backend/database-seed/package-lock.json

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

6 changes: 6 additions & 0 deletions backend/database-seed/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencies": {
"dotenv": "^16.4.7",
"mongodb": "^6.12.0"
}
}
Loading

0 comments on commit b518807

Please sign in to comment.