Skip to content

Meal Genie is a React meal planning app to take the legwork out of the weekly food shop

Notifications You must be signed in to change notification settings

LukeTwomey/meal-genie

Repository files navigation

Meal Genie

Installation

Clone the repo and run the following command at the root of the project:

$ npm install

Configuration

In order to successfully connect to the remote MongoDB, you will need to duplicate the config/dev.js.example file (still within the config folder), and name it as follows:

dev.js

Open that file and replace "password" with the password of the admin account with access to the meal-genie-development database. The contents of dev.js should look something like:

module.exports = {
    mongoURI: "mongodb+srv://admin:[email protected]/heroku_xg884p0t?retryWrites=true&w=majority",
}

In addition to adding the password to gain access to the MongoDB database, you also need to whitelist your external IP in the MongoDB settings.

Log into MongoDB and open the meal-genie-development project. Go to Network Access (under Security on the left hand side of the screen), and add in your external IP address to the IP whitelist in order for MongoDB to grant you access when establishing the connection.

Running the app in development

To run the app in development:

npm run dev

Connecting a development database

Create a new project, cluster and database on mongodb.com

Create a config/dev.js file using the contents of config/dev.js.example. Add the uri for the database you just created.

module.exports = {
    mongoURI: 'mongodb+srv://username:[email protected]/test?retryWrites=true&w=majority'
}

If the connection is set up correctly, on starting the app a test document like the following should have been added to the database:

_id: ObjectId("5d0cf038837aca26837fbab4")
name: "luke"
__v: 0

Feature Development

Create a branch for all new features. By committing to this branch and creating a PR in GitHub, a short-lived environment will be created in Railway to view and test your changes. Merging the PR will be picked up by Railway and a new build will be created and deployed to both the "Production"/"Portfolio" environment, and the "Staging"/"Home" enironment.

About

Meal Genie is a React meal planning app to take the legwork out of the weekly food shop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published