Coder Social home page Coder Social logo

mern-starter's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.