{"size": 489, "ext": "js", "max_stars_repo_path": "server/database.js", "max_stars_repo_name": "ahmedjamalikram/baghalati-api", "max_stars_repo_stars_event_min_datetime": "2019-08-31T12:45:41.000Z", "max_stars_repo_stars_event_max_datetime": "2019-08-31T12:45:41.000Z", "max_issues_repo_path": "server/database.js", "max_issues_repo_name": "ahmedjamalikram/baghalati-api", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server/database.js", "max_forks_repo_name": "ahmedjamalikram/baghalati-api", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 15.7741935484, "max_line_length": 58, "alphanum_fraction": 0.6605316973}
/**
* Name: database
*
* @author Samer Alotaibi
*		  sam@samiscoding.com
*
*
*
* Description: mongo database connection
*
* Requirements: monggose
*
* @package commerce
* @property
*
* @version 1.0
*/
const mongoose = require('mongoose');

const URI = 'mongodb://localhost:27017/app-commerce';

mongoose.connect(URI, {
    useNewUrlParser: true
})
    .then(db => console.log(`${URI} is connected`))
    .catch( err => console.log(`Error en Mongo: ${err}`));

module.exports = mongoose;


