Skip to content
 
 

Repository files navigation

TravelMinds

A Computer Science Project for the University of Helsinki CSM11006 course.

Travelminds Documentary

Trello board

The board

Invite link

Setup project

Create a .env.local file in the root (same place as package.json)

Add the connection string to .env.local, replace with the connection string.

MONGODB_URI="<ask for connection string>"
GOOGLE_API_URL="<ask>"
GROQ_API_URL="<ask>"

Optional

If you use nvmrc that is recommended, run nvm use to get the correct Node version.

Run

npm ci - to install dependencies

npm run dev - to start the development server

Upon successful connection to MongoDB, the application will be accessible at url localhost:3000

Seeding the Database

To seed the database with a sample user and preferences, run the following command:

npm run seed

This script will:

Connect to the MongoDB database specified in your .env.local file.
Clear the existing users in the database.
Add a sample user with predefined preferences.

Notes:

  • Ensure that your .env.local file contains the MONGODB_URI pointing to your MongoDB instance.
  • The path to the User model in the seed.js script (./src/models/User.js) should be adjusted based on your project's directory structure.
  • Before running the seed script, make sure all dependencies are installed by executing npm install.

By following these steps, you'll set up a seed script that initializes your MongoDB database with a sample user and preferences, facilitating development and testing.

About

CSM11006 Computer Science Project

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages