Skip to content

IamMohaiminul/MERNjs

Repository files navigation

MERNjs is an open-source full-stack JavaScript solution, which provides a solid starting point for MongoDB, ExpressJS, ReactJS and NodeJS based applications. The idea is to solve the common issues with connecting those frameworks, build a robust framework to support daily development needs, and help developers use better practices while working with popular JavaScript components.

Before You Begin

Before we begin, recommend to read about the basic building blocks that assemble a MERNjs application:

Prerequisites

Make sure we have installed all of the following prerequisites on our development machine:

Downloading MERNjs

Currently there is a single way that we can get the MERNjs boilerplate:

Cloning The GitHub Repository

The recommended way to get MERNjs is to use git to directly clone the MERNjs repository:

$ git clone https://github.com/IamMohaiminul/MERNjs MERNjs

This will clone the latest version of the MERNjs repository to a MERNjs folder.

Run our Application

To run our application follow this steps.

Note: Before start the process, rename .env.example to .env and configure the environment variables.

To install the dependencies
// both dependencies and devDependencies
$ npm install
To build the application
// build both server and client
$ npm run build

// build only server
$ npm run build:server

// build only client
$ npm run build:client
To start the application
// without debug mode
$ npm start

// with debug mode
$ npm run debug
To watch the live changes of application
// watch both server and client
$ npm run watch

// watch only server
$ npm run watch:server

// watch only client
$ npm run watch:client

Note: Please make sure our MongoDB is running.

Running application endpoints

Our application should run on port 3000 based on the environment configuration.

License

The MIT License