3.3.2 • Published 6 years ago

fh-db v3.3.2

Weekly downloads
112
License
Apache-2.0
Repository
github
Last release
6 years ago

fh-db(1) -- The FeedHenry Database access library

npm package

Dependency Status Known Vulnerabilities

Project Info
License:Apache License, Version 2.0
Build:npm
Documentation:http://docs.feedhenry.com/v3/api/cloud_api.html
Issue tracker:https://issues.jboss.org/projects/FH/summary
Mailing list:feedhenry-dev (subscribe)
IRC:#feedhenry channel in the freenode network.

DESCRIPTION

This contains the fh.db() layer the works above the mongodb library. It has a Ditch-like interface, with the same actions and parameters

Installation

Add fh-db as a dependency to your module and require it where required, like any other npm module

Testing

N.B. This guide assumes you have a functional docker-machine.

Start Mongo Server

Start the docker machine for the version of mongo you wish to test:

docker run -d -p 27017:27017 mongo:2.6

Note for docker-machine users

You will need to connect your localhost:27017 to the docker-machine:27017, do this with the following command:

VBoxManage controlvm `docker-machine active` natpf1 "docker-mongo,tcp,127.0.0.1,27017,,27017"

In the above docker-mongo is the name of the rule, this is important to remember, in order to remove it when not required.

Remove the above rule as follows:

VBoxManage controlvm `docker-machine active` natpf1 delete docker-mongo

Setup Mongo Database

connect to Mongo:

mongo

For MongoDB versions > 3.x

Well, instead of MongoDB 2.6 stated above if you used MongoDB 3.x, you will need to update the authentication to work with fh-db, which is done as follows:

use admin
db.system.users.remove({})
db.system.version.remove({})
db.system.version.insert({ "_id" : "authSchema", "currentVersion" : 3 })

Then exit mongo and restart the docker container:

docker stop <container-name>
docker start <container-name>

And reconnect to mongo:

mongo

Add the admin user:

use admin
db.createUser({user: 'admin', pwd: 'admin', roles: ['root']})
Test the login:

exit mongo and run:

mongo admin -u admin -p admin

Add the ditchuser

Log in as the admin user, if you are not yet, then run:

use fh-ditch
db.createUser({user: 'ditchuser', pwd: 'ditchpassword', roles: ['dbAdmin']})
Test the login:

Exit Mongo and run:

mongo fh-ditch -u ditchuser -p ditchpassword

Execute the test

grunt fh:unit
3.3.2

6 years ago

3.3.1

6 years ago

3.3.0

7 years ago

3.2.0

7 years ago

3.1.0

7 years ago

3.0.0

7 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.4.4

7 years ago

1.4.3

7 years ago

1.4.1

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.7.3

8 years ago

0.7.1

8 years ago

0.7.0

8 years ago

0.6.0

8 years ago

0.5.8-37

8 years ago

0.5.7-33

9 years ago

0.5.4

9 years ago

0.5.3-15

9 years ago

0.6.0-14

10 years ago

0.5.2-10

10 years ago

0.5.1-268

10 years ago

0.5.0-266

10 years ago

0.4.12-265

10 years ago

0.4.11-264

10 years ago

0.4.10-263

10 years ago

0.4.9-262

10 years ago

0.4.8-152

10 years ago

0.4.8-150

11 years ago

0.4.7-149

11 years ago

0.4.6-147

11 years ago

0.4.5-140

11 years ago

0.4.4-138

11 years ago

0.4.3-137

11 years ago

0.4.3-26

11 years ago

0.4.3-21

11 years ago

0.4.2-20

11 years ago

0.4.1-18

11 years ago

0.4.0-14

11 years ago

0.3.0-12

11 years ago

0.2.0-9

11 years ago

0.1.0-3

11 years ago