Git Product home page Git Product logo

fullstack-mern-app's Introduction

A Full Stack App developed using MERN

This repo hosts a Express App in main folder and a React App in admin folder

Run Locally

Server

from main folder run

npm install

npm run dev

Application will start at localhost:4000 you should have installed nodmeon once using below commad

npm i nodemon -g

Client

admin folder resides inside same root folder go to admin folder and execute following commands

npm i

npm start

react app will start at localhost:3000/admin

Deploy

This application is heroku ready you must declare three environment variables namely

jwtPrivateKey

db

sessionSecret

db will contain the connection string of your mongo db ideally you should create a project at http://mongodb.com and get a connection string from there.

just copy the code in your own repo and link your heroku with this code.

Data integrity

A Cron job runs at the server to refresh the data every 30 minutes. comment out

const { startCronJobs } = require("./croneJobs/index");

to avoid data refresh

default user

name:"usman", email:"[email protected]" password:"admin" roles:["admin","customer"]

every user who has admin in its roles array will be able to modify the data.

caution

locally react app will not be served from express. In order to do that you need to run following command from admin folder

npm run build

info

Live version is hosted at https://fullstack-usman.herokuapp.com/

fullstack-mern-app's People

Contributors

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