npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mongo-edit

v0.6.0

Published

Dead simple GUI for editing MongoDB documents

Downloads

18

Readme

Mongo Edit

Dead simple Graphical User Interface for MongoDB. This is NOT a complete admin UI, just a way to edit documents manually with a user-friendly interface. It's a perfect fit for people working with an ODM, for example Mongoose which is in charge of the administration.

What does it do?

  • / shows the list of all collections
  • /:collection shows the contents of collection
  • /:collection/:id/edit shows a web-based editor (Ace) so that you can change the contents of the collection's document with id id. The document is shown as a Javascript object that will replace the current one in the database when you save it. The editor features syntax highlighting and checking. An image being worth a thousands words, here is a screenshot:

Install and configure

Prerequisite: Node.js should be installed
Install Mongo Edit in one command: npm install mongo-edit

The config file, /lib/config.js needs to be modified to fit your situation. The parameters are:

  • db.host, db.port, db.name: what database to connect to. It is assumed that you run in a trusted environment and don't need password to access the database (this should be the case for all developpement machines and most production machines with a restrictive firewall).
  • svPort: the port on which the webserver will run.
  • trustProxy: needs to be set to true if Mongo Edit is run behind a reverse proxy such as Nginx. If you run Mongo Edit in production and it is accessible from the outside, this should be the case. Obviously, it should be protected by a BasicAuth over SSL.
  • pagination: the parameters for the pagination when showing the contents of a collection. The defaults should be fine.

You can define different environments (the original config file has 'development' and 'production'). By default, the development environment is used, to user another run NODE_ENV=the_environment node server.js.

Run

Run with node server.js, or NODE_ENV=env node server.js if you don't want to use the default environment. It will then run on the port defined in the config (e.g. with the original config and on my development machine, it runs on localhost:2762).

If you run Mongo Edit in production, run it behind your reverse proxy, and protected with a Basic Auth on SSL.

Feature requests

We want Mongo Edit to remain super simple, there are already plenty complete admin UIs out there. Still, if you think something is missing don't hesitate to drop us an issue or a PR.

License

(The MIT License)

Copyright (c) 2012 tldr.io <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.