Skip to content

JakobKIT/MERN-project-template

Repository files navigation

This is a MERN Stack project template. Still a WIP. Clone it, use it, modify it!

About

This project can be used as a boilerplate for any MERN Stack project you want to build! You can use only the client (React) or the server (NodeJS) section independently aswell.

Prerequisites

For this project to run you need to have a mongoDB connection. Either a local MongoDB or hosted on something like AWS, Azure etc. Additionally you need git, NodeJS and npm installed.

Setup

First clone this project.

$ git clone https://github.com/JakobKIT/MERN-project-template.git

After cloning the project you need to install all dependencies.

$ npm install 
$ npm run client-install

Last but not least create 2 .env files. I created a template in the folder.

/server/config

Features

The project is split into two different subfolders, one containing the server (NodeJS) the other the client (React). To run the project in Development mode just use the following command:

$ npm start dev

This will start the NodeJS server aswell as the webpack-dev-server for the client. To do that I used concurrently.

Server (NodeJS)

The server is using express as a web framework and mongoose as a ORM for mongoDB. While running in development mode, morgan is used to log the incoming requests to your terminal. Furthermore there are two seeding scripts that create some test data und a user to log in. The user information will be displayed in your terminal too.

Client (React)

The client side is build using React and Redux. For bundling the files in development aswell as in production mode webpack is used. For backwards compatibility babel is used aswell.

License

MIT

About

This is a MERN Stack project template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages