Giter VIP home page Giter VIP logo

mongodb-mongopop's Introduction

MongoPop

Wednesday, 22 February 2017.

Alternate UIs

Not for production

A web tool to populate a MongoDB Atlas instance with sample data (fetches datasets from Mockaroo).

Includes:

  • Express Restful API
  • Angular2 web client
  • MongoDB Node.js driver use
  • Connections to MongoDB Atlas

Usage

git clone [email protected]:am-MongoDB/MongoDB-Mongopop.git
cd MongoDB-Mongopop
npm install
npm run tsc:w
npm run express

Browse to http://localhost:3000/ (or to the IP address or hostname specified in public/app/app.component.ts) to use the Angular2 client.

Browse to http://localhost:3000/react (or to the IP address or hostname specified in public/app/app.component.ts) to use the ReactJS client.

To be completed

  • Add Amazon Alexa client?
  • Consider AWS Lambda?
  • Consider iOS Workflow?

mongodb-mongopop's People

Contributors

am-mongodb avatar shadsterling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mongodb-mongopop's Issues

License

I want to use db.js in a school project and wondering if its possible for you to add a license file.
Thank you very much.

Error: connect ECONNREFUSED 127.0.0.1:27017

I'm working my way through The Modern Application Stack – Part 3: Building a REST API Using Express.js and all is good until I try to actually access the database.

My IP 73.149.42.228 has been whitelisted in MongoDB Atlas.

Running:

curl -g -X POST --data '{
   "MongoDBURI": "mongodb://localhost:27017/mongopop?authSource=admin&socketTimeoutMS=30000&maxPoolSize=20",
   "collectionName": "simples"}' -i "localhost:3000/pop/countDocs" --header "Content-Type:application/json"

produces the following:

HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Content-Length: 325
ETag: W/"145-bNxKpZb5XY3Hu1HWlj+R614UQw8"
Date: Tue, 22 Oct 2019 23:16:30 GMT
Connection: keep-alive

{"success":false,"count":0,"error":"Failed to count the documents: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1126:14) {\n  name: 'MongoError',\n  message: 'connect ECONNREFUSED 127.0.0.1:27017'\n}]"}

Here's the contents of my config.js file:

var config = {
  expressPort: 3000,
  client: {
    mongodb: {
      defaultDatabase: "mongopop",
      defaultCollection: "simples",
      defaultUri: "mongodb://localhost:27017"
    },
    mockarooUrl: "https://api.mockaroo.com/api/4b1dceb0?count=1000&key=4b0115c0"
  },
  makerMongoDBURI: "mongodb://localhost:27017/maker?authSource=admin",
  checkinCollection: "foursq"
};

module.exports = config;

So many packages are old

As a new MongoDB employee, trying to do the guides that customers would go through. I tried you article at https://www.mongodb.com/blog/post/the-modern-application-stack-part-2-using-mongodb-with-nodejs and encountered the following issues.

albertwong@Alberts-MacBook-Pro MongoDB-Mongopop % npm install
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Please update to the latest version of pug, at time of writing that is [email protected]
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: you probably meant to install typescript
npm WARN deprecated [email protected]: Deprecated, use jstransformer
npm WARN deprecated [email protected]: Please update to at least constantinople 3.1.1
npm WARN deprecated [email protected]: Fixed a critical issue with BSON serialization documented in CVE-2019-2391, see https://bit.ly/2KcpXdo for more details
npm WARN deprecated [email protected]: Please use pug-load for pug-loader@<=1.0.2.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

> [email protected] postinstall /Users/albertwong/sandbox/MongoDB-Mongopop/node_modules/ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)


> [email protected] postinstall /Users/albertwong/sandbox/MongoDB-Mongopop
> cd public && npm install

npm WARN deprecated [email protected]: Typings is deprecated in favor of NPM @types -- see README for more information
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: https://github.com/jfhbrook/node-ecstatic/issues/259
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: Use `agent` option with `popsicle` directly
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated

> [email protected] postinstall /Users/albertwong/sandbox/MongoDB-Mongopop/public/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> [email protected] postinstall /Users/albertwong/sandbox/MongoDB-Mongopop/public
> typings install

typings WARN deprecated 9/14/2016: "registry:dt/selenium-webdriver#2.44.0+20160317120654" is deprecated (updated, replaced or removed)
typings WARN deprecated 10/25/2016: "registry:dt/jasmine#2.2.0+20160621224255" is deprecated (updated, replaced or removed)
typings WARN deprecated 11/21/2016: "registry:dt/node#6.0.0+20160831021119" is deprecated (updated, replaced or removed)
typings WARN deprecated 11/1/2016: "registry:dt/angular-protractor#1.5.0+20160425143459" is deprecated (updated, replaced or removed)
typings WARN deprecated 9/14/2016: "registry:dt/core-js#0.0.0+20160725163759" is deprecated (updated, replaced or removed)

├── angular-protractor (global)
├── core-js (global)
├── jasmine (global)
├── node (global)
└── selenium-webdriver (global)

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=0.10.0 <7"} (current: {"node":"14.8.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]

added 445 packages from 267 contributors and audited 447 packages in 13.529s

6 packages are looking for funding
  run `npm fund` for details

found 17 vulnerabilities (3 low, 1 moderate, 13 high)
  run `npm audit fix` to fix them, or `npm audit` for details
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No license field.

added 214 packages from 237 contributors and audited 218 packages in 19.546s

5 packages are looking for funding
  run `npm fund` for details

found 15 vulnerabilities (7 low, 1 moderate, 3 high, 4 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.