Code Monkey home page Code Monkey logo

mern-demo's Introduction

To Start Local Server -

A. Setting Up the server -

  1. Install heroku-cli
  2. Install nodemon with npm i -g nodemon
  3. Run npm i to install the server-side dependencies
  4. Run touch .env then open it and fill it like the sample .env file.
  5. Run npm start and make sure the mongo instance is also running.

B. Setting Up the client -

  1. Run cd client in separate terminal to change into client directory.
  2. In client directory run npm i to install client-side dependencies.
  3. In client directory run touch .env and fill stripePubKey=pk_test_-------------- in it .
  4. In client directory run npm start .
  5. Navigate to localhost:3000 in the browser.

Sample .env file

NODE_ENV=development
port=5000
googleClientID=-------------.apps.googleusercontent.com
googleClientSecret=--------------
mongoURI=mongodb://localhost:27017/merndemodb
cookieKey=---------------
HOST_URL=http://localhost:5000
stripePubKey=pk_test_--------------
stripeSecretKey=sk_test_-------------

Milestones

  1. Configure Express to work with React.js via Proxy.
  2. Google Oauth2.0 Api.
  3. Stripe payment Api.
  4. Setup production build to Heroku.
  5. Handle multiple env variables for both server and client.
  6. Use ES2017 syntax with async/await instead of promises.
  7. React with Redux architecture.
  8. Session Authentication with Passport.js and Cookies.
  9. Create Webhooks for Google and Stripe Apis.
  10. Database Management using MongoDB.

Note -

  1. Heroku Cli is used for handling environment variables and deploys.
  2. To get googleClientID and googleClientSecret make a new project at here and enable the Google+ api.
  3. To get stripePubKey and stripeSecretKey create account on Stripe.
  4. If you don't have mongodb locally, then create a remote db here

mern-demo's People

Contributors

ankitjain28may avatar itaditya avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.