Coder Social home page Coder Social logo

wallace222 / mernboilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gauravwalia19/mernboilerplate

0.0 0.0 0.0 1.26 MB

A minimalist MERN app boilerplate that does'nt suck

License: MIT License

HTML 13.39% CSS 7.24% JavaScript 79.37%

mernboilerplate's Introduction

mongo

BOILERPLATE

This is a boilerplate repo for creating new mern stack apps that doesn't sucks.

This is minimalist boilerplate for Full Stack MERN developers (Recommended for beginners only). This boilerplate provides basic configurations like:

  • Sample CRUD API
  • Create-react-app boilerplate
  • NPM Scripts needed for MERN Stack
  • Sample mongoose connection provided for connecting API with database like mongodb
  • Heroku Deployment Configurations

Available Scripts

For APIs to work in development please add a .env file in root of the project and add your MONGODB_URI in that file.

yarn start

Runs the server in the production mode.
Open http://localhost:5000/api/v1/get to view sample CRUD API output from server in the browser.

yarn run dev

Runs the server in the development mode.
Open http://localhost:5000/api/v1/get to view sample CRUD API output from server in the browser.

The server will auto restart if you make any changes.

yarn run client

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn run mern

Runs the server and the client at the same time that makes MERN Stack development easier.

Open http://localhost:5000/api/v1/get to view sample CRUD API output from server in the browser.

Open http://localhost:3000 to view React App in the browser.

Steps for Heroku Deployment

Dependencies

  • nodejs
  • yarn package manager
  • heroku cli

Deployment Steps

  1. Check whether you have heroku installed in you PC or not using heroku --version command. If you don't have then you can install it from here.

  2. Create your account if you don't have any.

  3. Then open the terminal or cmd in root directory and make sure you have created a git repository for your project. Remove .git directory if present in client folder otherwise it may lead to deployment issues.

  4. All the heroku build deployment scripts are provided you can review and update the engine in root package.json if you want to deploy with any other version of node and yarn .

  5. Then login your heroku account using heroku login.

  6. After login its time to create a new app with you app name using heroku create <your unique app name>. If you get name already used then you have to choose any other unique name.

  7. Now open the heroku account in the browser, you will see your app is created. Then open the settings of the app and in the config vars add heroku variables like MONGODB_URI.

  8. For deployment run git push heroku master and it will deploy your app on heroku.

LICENSE

MIT LICENSE

mernboilerplate's People

Contributors

gauravwalia19 avatar

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.