Git Product home page Git Product logo

db-server-crud's Introduction

MyNotes

License MIT

A simple server made using MVC on node.js for working with persistent data stores.

Getting Started

Prerequisites

To quickly create and configure a database, we use the mLab service. Working with him is easy, for small amounts of information he is free.

Installing

Clone repository:

git clone https://github.com/MegaRoks/MyNotes.git

npm:

npm install

Next, we need to verify that MongoDb is installed by running:

mongo --version

If MongoDb is not installed on your machine, you should head to MongoDb Download Center , download and install the version compatible with your operating system before you continue.

Create an account on mLab and deploy the new MongoDB database. To do this, click on the Create New button in the MongoDB Deployments section, in the appeared window, in the Plan section, select Single-node. Click Continue, select the Sandbox server and give the database a name. Next, in the database management window, go to the Users tab and add a database user, setting a name and password.

Add the config directory to the project root, create a db.js file in it.

mkdir config 
cd config
touch db.js

Add the following to the db.js file:

module.exports = {
  url : "mongodb://<dbuser>:<dbpassword>@ds040089.mlab.com:40089/dbnotes"
};

Do not forget to add the username and password to the URL (not the ones from the account in mLab, but those created for the database). If you are posting a project on Github, be sure to include db.js in the .gitignore file. So you will not make the public domain the name and password for working with the database.

run:

npm run dev

Contribute

Contributions are very welcome!

Open an issue for bug and feature requests or submit PR and make this plugin better.

License

This project is licensed under the terms of the MIT license.

db-server-crud's People

Contributors

megaroks avatar

Watchers

 avatar

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.