Closed thewillyhuman closed 6 years ago
Another option is that you create your own dabase at mlab.com to make dummy tests.
I don't know which library are you using for mongoDB but maybe this works for you. The connection string is already set to our server.
MongoClient mongo = new MongoClient(
new MongoClientURI( "mongodb://loader:1234@ds237445.mlab.com:37445/aswdb" )
);
Already changed the properties file
To change from a localhost database to a remote database edit the database.properties file as following.
Changes required
Host
In the following line change
localhost
tods237445.mlab.com
. https://github.com/Arquisoft/Loader_i3a/blob/7d0555cc349632d4c69f06c783b46826f08b2852/src/main/resources/database.properties#L1Port
Change the port value to
37445
. https://github.com/Arquisoft/Loader_i3a/blob/7d0555cc349632d4c69f06c783b46826f08b2852/src/main/resources/database.properties#L2Database name
To work with out server you should change the
Citizens
toawsdb
. https://github.com/Arquisoft/Loader_i3a/blob/7d0555cc349632d4c69f06c783b46826f08b2852/src/main/resources/database.properties#L3Collection name
This parameter does not need to change. https://github.com/Arquisoft/Loader_i3a/blob/7d0555cc349632d4c69f06c783b46826f08b2852/src/main/resources/database.properties#L4
User & Password
As far as now we're using a remote test server you will need a user and a password to connect to the database. Those will be the next ones.
loader
1234
Other considerations
The database has a maximum capacity of 500Mb so please don't consume all when testing try to create/remove trash as much as possible.
If you are using a string for the connection this is the correct format to work with the mlab database.
mongodb://dbuser:dbpassword@ds237445.mlab.com:37445/aswdb