<<<<<<< HEAD
A basic note application that uses a ReactJS frontend to capture and manage notes, an api written in ExpressJS, and MongoDB to store notes.
- Add a note
- Edit a note
- Remove a note
- List all notes
- Find note by title
- NodeJS - Javascript runtime
- MongoDB - NoSQL database
- Docker - Used to host MongoDB instance (Not manadatory. See other options below)
- ExpressJS - A web application framework for Node.js
- ReactJS - Javascript library for building user interfaces
- Bootstrap v4.0.0-beta.2 - Build responsive, mobile-first projects
- Webpack - Javascript module bundler
-
A basic note application that uses a CLI (Command Line Interface) frontend to capture and manage notes, and a file system to store notes
-
A basic note application that uses a CLI (Command Line Interface) frontend to capture and manage notes, and mongodb to store notes
-
A basic note application that uses a CLI (Command Line Interface) frontend to capture and manage notes, Mongoose ODM to manage MongoDB interaction, and mongodb to store notes
-
A basic note application that uses a CLI (Command Line Interface) frontend to capture and manage notes, and couchbase as a data store
-
A basic note application that uses a CLI (Command Line Interface) frontend to capture and manage notes, an express note management API built using Express, and Mongodb to store notes
-
A basic note application that uses an Express frontend to capture and manage notes, and mongodb to store notes
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
The following software is required to be installed on your system:
-
NodeJS
The following version of Node and Npm are required:
- Node 8.x
- Npm 3.x
Type the following commands in the terminal to verify your node and npm versions
node -v npm -v
-
MongoDB
MongoDB 3.x is required
Type the following command to verify that MongoDB is running on your local machine
mongo -version
See alternative MongoDB options below
A running instance of MongoDB is required. Alternatively use a hosted MongoDB from MongoDB Atlas or MLab
One of the 3 options below is recommended to get up and running with MongoDB:
- Install and host locally
- Install and host in Docker
- Register for third party MongoDB hosting
- Register for and use MongoDB Atlas (Database As A Service)
- Register for and use MLab (Database As A Service)
Installing MongoDB is relatively straight forward. There are currently 3 platform (Windows, Linux, OSX) releases available and can be found here
For more specific installation instructions, please see the following links:
To run a new MongoDB container, execute the following command from the CLI:
docker run --rm --name mongo-dev -p 127.0.0.1:27017:27017 -v mongo-dev-db:/data/db -d mongo
CLI Command | Description |
---|---|
--rm | remove container when stopped |
--name mongo-dev | give container a custom name |
-p | map host port to container port |
-v mongo-dev-db/data/db | map the container volume 'data/db' to a custom name 'mongo-dev-db' |
-d mongo | run mongo container as a daemon in the background |
cd
mkdir -p mongodb/data/db
docker run --rm --name mongo-dev -p 127.0.0.1:27017:27017 -v ~/mongodb/data/db:/data/db -d mongo
CLI Command | Description |
---|---|
--rm | remove container when stopped |
--name mongo-dev | give container a custom name |
-p | map host port to container port |
-v ~/mongodb/data/db/data/db | map the container volume 'data/db' to a bind mount '~/mongodb/data/db' |
-d mongo | run mongo container as a daemon in the background |
MongoDB Atlas is basically a database as a service and is hosted in the cloud. That means that you don't need to install or setup anything to start using MongoDB.
You can get started for free by registering here. The free tier entitles you to 512MB storage.
Please review the documentation here
MLab also provides MongoDB cloud hosting in the form of database as a service. Once again there is no installation or setup required.
To get started, signup for free account here. The free tier entitles you to 500MB storage.
Please review the documentation here
Follow the following steps to get development environment running.
-
Clone 'noteworx-react-mongodb' repository from GitHub
git clone https://github.com/drminnaar/noteworx-react-mongodb.git
or using ssh
git clone [email protected]:drminnaar/noteworx-react-mongodb.git
-
Install node modules
cd noteworx-react-mongodb npm install
There are 2 build options:
-
Build
npm run build
-
Build with watch enabled
npm run build:watch
-
Lint project using ESLint
npm run lint
-
Lint project using ESLint, and autofix
npm run lint:fix
All the API (server) code is found in the 'Server' folder.
Before running the React application, the API needs to be started.
The following command wil start server and host api at http://localhost:8000/api
npm run serve:api
-
Run Dev Server
Start React usinf React dev server
npm run serve:dev
I use SemVer for versioning. For the versions available, see the tags on this repository.
- Douglas Minnaar - Initial work - drminnaar
=======
6f1a1ec90265f627a3d72e51ae66e681754a2255