Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 2.03 KB

README.md

File metadata and controls

40 lines (29 loc) · 2.03 KB

express-mongodb-rest

Richard Wen
[email protected]

Express middleware for MongoDB REST APIs

npm version Build Status Coverage Status npm GitHub license Donarbox Donate PayPal Donate Twitter

Test Environment

The test environment creates an isolated MongoDB database named expressmongodbrest_database to run tests on.

To connect to MongoDB, a .env file is required:

  1. Create a .env file in the root directory
  2. Use the template below to provide MongoDB connection details inside the .env file
  3. Ensure that expressmongodbrest_database does not exist (otherwise it will be dropped after tests)
MONGODB_CONNECTION=mongodb://localhost:27017
MONGODB_TESTDATABASE=expressmongodbrest_database
MONGODB_COLLECTION=rest_data

The Tests can then be run with the following command:

npm test