A simple server made using MVC on node.js for working with persistent data stores.
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.
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 Sandbo
x 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
Contributions are very welcome!
Open an issue for bug and feature requests or submit PR and make this plugin better.
This project is licensed under the terms of the MIT license.