Skip to content

JonesXavi/MERN-ToDo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learnt in 2019 - [TODO - MERN]

Its 2019 and Winter Is Coming. Well, apart from the excitements of GOT, Avengers: End game and others, there is a mandatory thing called resolutions. So, I thought to myself why not start a new one, a learning resolution.

PS: I'm still struggling to succeed in my weight loss resolution :trollface:.

So, I kickstart my Learnt in 2019 Series with this simple ToDo app. I will continue to develop apps atleast fortnightly 😜 .

A simple ToDo app built in MERN stack. Created stateful components to keep things simple. Redux is not used.

Learnings

  • Developed using React 16.
  • MLab is used for database purpose.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development.

Prerequisites

Follow this MLab document to setup database. Create a DB user under Users tab.

Note: Avoid using special characters such as “@”, “/”, or “:” in your database username or password as they can cause issues if they are not properly escaped.

Once completed, create a .env file in the root directory and put the below code:

DB = 'mongodb://<dbuser>:<dbpassword>@<dburi>'

  • dbuser - The user created.
  • dbpassword - The user's corresponding password.
  • dburi - You can find this in the MLab page once you create a database.

Installing

  1. Clone this repo to your local.
  2. Do npm run server-install inside the repo folder.
  3. Do npm run client-install.
  4. Once all necessary files are installed, run npm run dev.

Available Scripts

In the project directory, you can run:

npm run start

Runs the node server
Open http://localhost:5000 in postman or similar and to validate the APIs.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm run start-watch

Runs the node server in watch mode.

npm run dev

Runs the node server and client application concurrently.
Open http://localhost:3000 to view it in the browser.

About

A Simple Todo app built in MERN stack

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published