Skip to content

An easy to use, mern template to kickstart developing apps

License

Notifications You must be signed in to change notification settings

adzo261/mern-starter

Repository files navigation

MERN Starter Template


An easy to use, mern template to kickstart developing apps


Hosted on Heruko

https://mern-starter.herokuapp.com/

Structure

    .
    ├── client                        # client react app
        ├── dist                      # client build folder
        ├──  src
            ├──  actions              # redux actions
            ├──  components           # react components
            ├──  constants            # stores constants
            ├──  images               # image assets
            ├──  reducers             # redux reducers
            ├──  index.css            # base css
            ├──  index.html           # base html
            ├──  index.jsx            # base react component
            ├──  store.js             # redux store
        ├──.babelrc                   # babel config
        ├──.package.json
        ├──.webpack.config.babel.js   # webpack config written in es6
    ├── server                        # server express app
        ├── build                     # server build folder
        ├──  src
            ├──  bin
                ├──  www.js           # server entry point
            ├──  routes               # routes folder
                ├──  index.js
            ├──  database.js          # database config
            ├──  server.js            # server config
        ├──.babelrc                   # babel config
        ├──  .env                     # env variables
        ├──.package.json
    ├── .eslintrc.json                # es linting config
    ├── .prettierrc
    ├── .travis.yml                   # travis CI
    ├── package.json
    ├── LICENSE
    └── README.md

Development setup

Fork it and clone as local repository.

$ cd mern-starter
$ npm install

Create a .env file in server folder as follows:

DATABASE=your_database_uri

Run only server express app locally and keep terminal open:

$ cd server
$ npm run dev-start

Run only client react app locally in new terminal:

$ cd client
$ npm run start

Note:

no-shadow eslinting rule has been turned off just to avoid linting errors with redux's mapStateToProps and mapDispatchToProps.

Contributing

  1. Read the CODE OF CONDUCT
  2. Fork the repo
  3. Create your feature branch (git checkout -b feature/fooBar)
  4. Commit your changes (git commit -am 'Add some fooBar')
  5. Push to the branch (git push origin feature/fooBar)
  6. Create a new Pull Request