Code Monkey home page Code Monkey logo

crudemernstack's Introduction

Employee Database

This application is built using the MERN (Mongo, Express, React, Node) stack

Simple CRUD operations supported:

  • Insert new Employee data to employee database
  • Read Employee data from employee database
  • Update Employee data in employee database
  • Delete Employee data from employee database

Try it out here https://crudemernstack.herokuapp.com/ (Heroku no longer provides free web dynos, will be looking for alternative hosting sites. https://blog.heroku.com/next-chapter)

Build and Run

Start Server (Stay at root folder crudemernstack):

To set up your MongoDB connection, go to index.js and edit the uri variable to your mongodb connection uri:

// process.env.mongodb << indicates the key to be used to identify process
const uri = process.env.mongodb || 'mongodb://localhost:27017/crud-app'
mongoose.connect(uri, {
    useNewUrlParser: true,
    useFindAndModify: false
},(err)=>{
    if(err){
        console.log('unable to connect to db')
        process.exit(1)
    }else{
        console.log('successfully connected to db')
    }
})

Or set up a local env variable as follows:

export mongodb=<MONGODB_CONNECTION_URI>

Build: npm install

Run: npm run start

Start Client (Go to crudemernstack/client):

Build: npm install

Run: npm run start

View: Navigate to http://localhost:3000/

crudemernstack's People

Contributors

plosslaw avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 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.