Skip to content

Commit 6ec87e9

Browse files
authored
Update CONTRIBUTING.md
Add in some simple MongoDB instructions Applies to #1745
1 parent 0942723 commit 6ec87e9

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/CONTRIBUTING.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This project uses [editor config](https://editorconfig.org/), please make sure t
99

1010
* [Git](https://git-scm.com/)
1111
* [node.js](https://nodejs.org/) *(see [`./package.json`](https://github.com/OpenUserJs/OpenUserJS.org/blob/master/package.json) engines for specific requirements)*
12-
* [MongoDB](https://www.mongodb.org/) (Optional. The project is preconfigured to use a dev DB on [mLab](https://mlab.com/).)
12+
* [MongoDB](https://www.mongodb.org/) *(Required: See [overall instructions here](https://docs.mongodb.com/manual/installation/) or [Community Edition instructions](https://docs.mongodb.com/manual/administration/install-community/))*
1313

1414
#### GitHub Fork Setup
1515

@@ -32,11 +32,19 @@ This project uses [editor config](https://editorconfig.org/), please make sure t
3232
#### Configuration
3333

3434
1. Navigate to https://github.com/settings/applications and register a new OAuth application, saving the Client ID and Secret. To ensure GitHub OAuth authentication will work the "Authorization callback URL" value must exactly match `AUTH_CALLBACK_BASE_URL` (see below, e.g. http://localhost:8080).
35-
2. Open a [MongoDB shell](https://docs.mongodb.com/manual/mongo/) and run the following (replacing "your_GitHub_client_ID" and "your_GitHub_secret") to create an "oujs_dev" database with a "strategies" collection containing your application instance's GitHub OAuth information.
36-
* `use oujs_dev`
35+
2. Open a [MongoDB shell](https://docs.mongodb.com/manual/mongo/) and run the following (replacing "your_GitHub_client_ID" and "your_GitHub_secret") to create an "openuserjs_devel" database with a "strategies" collection containing your application instance's GitHub OAuth information.
36+
* `use openuserjs_devel`
3737
* `db.createCollection("strategies")`
3838
* `db.strategies.insert({id: "your_GitHub_client_ID", key: "your_GitHub_secret", name: "github", display: "GitHub"})`
3939
3. Edit `models/settings.json`, setting your desired session secret, [MongoDB connection string](https://docs.mongodb.com/manual/reference/connection-string/) (if using your own MongoDB instance), etc.
40+
4. Depending on how you installed MongoDB you may need to set an environment variable in your CLI:
41+
42+
Linux Example:
43+
~/.bashrc
44+
``` console
45+
export CONNECT_STRING=mongodb://127.0.0.1:27017/openuserjs_devel
46+
```
47+
5. You may import a “dirty” database using `mongorestore --gzip --db openuserjs_devel --archive=./dev/devDBdirty.gz` from the projects home.
4048

4149
#### Running the Application
4250

0 commit comments

Comments
 (0)