Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 1.14 KB

INSTALLING.md

File metadata and controls

75 lines (55 loc) · 1.14 KB

Installation

1. Clone the repository

git clone [email protected]:open-source-society/ossu-api.git

2. Load the dependencies (via NPM)

npm install

3a. Install MongoDB (via homebrew)

brew update && brew install mongodb

3b. Install MongoDB (manual)

Download the binaries

curl -O https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.0.6.tgz

Extract the binaries

tar -zxvf mongodb-osx-x86_64-3.0.6.tgz

Copy the extracted files to the target directory

mkdir /opt/mondodb
cp -R -n mongodb-osx-x86_64-3.0.<6 class="tgz"></6>

Add MongoDB to the PATH variable

export PATH=/opt/mongodb/bin:$PATH

Note: To permanently update PATH add the install directory to ~/.bashrc.

###4. Create the data folder

mkdir data

###5. Startup up MongoDB

mongod --dbpath ./data

Database Operations

Verify the connection to MongoDB

node connected.js

Create a collection (ie table)

node collection.js --create [name]

Delete a collection

node collection.js --destroy [name]

Dependencies

  • MongoDB