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.
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.
-
npm run start:watch
- starts the development server with hot reloading enabled -
npm run bs
- bundles the code and starts the production server -
npm run test
- start the test runner -
npm run watch:test
- start the test runner with watch mode -
npm run cover
- generates test coverage report -
npm run lint
- runs linter to check for lint errors
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.
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.
MERN is released under the MIT License.