/MERN-starter-kit

MERN starter kit for creating applications deployed to Cloud Foundry

Primary LanguageJavaScriptApache License 2.0Apache-2.0

MERN starter kit

This starter project provides the base elements needed to create an application using the MERN stack:

Test libraries:

Additional integrations are provided:

Bootstrapped with Create React App

Prerequisites

It is necessary to have Node installed as well as a MongoDB instance up and running as a background process.

Project Structure

The project is divided by the /server directory where you can find everything related to backend development such as exposing or consuming an API, querying a DB, etc.

The /src directory contains everything related to frontend development.

Finally, the /public directory contains static resources such as favicon.ico and the translation files provided inside the locales directory.

Getting Started

  1. Download or clone repository:

    git clone --depth=1 https://github.com/tcerdaITBA/MERN-starter-kit.git your-project-name
  2. Install dependencies:

    npm install
  3. Run project in development mode provided with hot reload:

    npm run dev

Scripts

The scripts may be shown at any time with the npm run command. Overview:

  1. run dev mode:

    npm run dev

    Runs the Node server at port 3000 and React App at port 3100 with hot reload as well as lint and test watchers.

  2. test:

    npm test

    Runs the project's lint and tests. Run with npm run test:watch in order to run jest interactive test watcher.

  3. lint:

    npm run lint 

    Runs the project's lint. Run npm run lint:fix in order to automatically fix errors.

  4. build:

    npm run build

    Builds the project creating a build directory.