Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Create a separate development environment #1

Closed
JacksonBates opened this issue Nov 29, 2016 · 1 comment
Closed

Create a separate development environment #1

JacksonBates opened this issue Nov 29, 2016 · 1 comment

Comments

@JacksonBates
Copy link
Owner

We need to have a dev environment that does not affect the production database.

At a minimum, we need something like this (thanks @jenovs):

const env = process.env.NODE_ENV || 'development';

if (env === 'development') {
  process.env.PORT = 3000;
  process.env.MONGODB_URI = 'mongodb://localhost:27017/TodoApp'; // replace with appropriate URI
} else if (env === 'test') {
  process.env.PORT = 3000;
  process.env.MONGODB_URI = 'mongodb://localhost:27017/TodoAppTest'; // replace with appropriate URI
}

We'd also need to modify the CONTRIBUTING file to explain how to set up the local environment, run tests etc.

Further discussion below is welcome - we won't necessarily rush this one, as it will pay to get it right.

Related to issue 28 from the front end repo: JacksonBates/pair-frontend#28

@jenovs
Copy link
Contributor

jenovs commented Dec 1, 2016

I'll try to implement it using my newly acquired knowledge (later in the Udemy's course that aforementioned code was tweaked, so it can store passwords, API keys etc.).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants