Skip to content

A Blog built with MongoDB, ExpressJS, ReactJS, NodeJS, Redux and Firebase

License

Notifications You must be signed in to change notification settings

ih-hugh/mern-blog

Repository files navigation

mern-blog

Magic Leap Blog built with MERN.

MERN is a scaffolding tool which makes it easy to build isomorphic apps using Mongo, Express, React and NodeJS. It minimises the setup time and gets you up to speed using proven technologies.

Quickstart

  git clone https://github.com/HugoCe17/mern-blog.git
  cd mern-blog
  npm install

Note : Please make sure your MongoDB is running. For MongoDB installation guide see this. Also npm3 is required to install dependencies properly.

Available Commands

  1. npm run start:watch - starts the development server with hot reloading enabled

  2. npm run bs - bundles the code and starts the production server

  3. npm run test - start the test runner

  4. npm run watch:test - start the test runner with watch mode

  5. npm run cover - generates test coverage report

  6. npm run lint - runs linter to check for lint errors

Caveats

FOUC (Flash of Unstyled Content)

To make the hot reloading of CSS work, we are not extracting CSS in development. Ideally, during server rendering, we will be extracting CSS, and we will get a .css file, and we can use it in the html template. That's what we are doing in production.

In development, after all scripts get loaded, react loads the CSS as BLOBs. That's why there is a second of FOUC in development.

Client and Server Markup Mismatch

This warning is visible only on development and totally harmless. This occurs to hash difference in react-router. To solve it, react router docs asks you to use match function. If we use match, react-hot-reloader stops working.

License

MERN is released under the MIT License.

About

A Blog built with MongoDB, ExpressJS, ReactJS, NodeJS, Redux and Firebase

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published