Giter Site home page Giter Site logo

brainwired_assigment's Introduction

brainwired_assigment

This project is a full-stack web application built with React, Node.js, Express, and MongoDB. It allows you to register users and displays a list of registered users and CURD Operations.

Api Route to acces the routes : https://brinewried.onrender.com

Prerequisites

Before you can run this project, make sure you have the following software installed on your machine:

  • Node.js

Installation

  1. Clone the repository to your local machine:
  1. Change into backend directory and install the dependencies for the server:
  • cd backend
  • npm install
  1. Change into the frontend directory and install the dependencies for the client:
  • cd ..
  • cd brainwaired
  • npm install

Configuration

  1. Create a .env file in the root directory of the project.

  2. In the .env file, add the following environment variables:

mongoURL=mongodb+srv://vamshi:[email protected]/Brainwired?retryWrites=true&w=majority port=5000

Running the Application

  1. Start the backend server by changing into backend directory:
  • npm run server

The server will run on http://localhost:5000.

  1. In a new terminal, change into the frontend directory and start the client server:
  • npm start

The client will run on http://localhost:5000 and open automatically in your browser.

Usage

Backend API Endpoints

  • POST /users/create: Register a new user. Requires the following JSON payload:
{
 "firstname": "vamshi",
 "lastname": "[email protected]",
 "dob": "2001-05-26",
"address" : "hyd
}
  • GET /user/get: Get all users
[
  {
      "_id": "1"
     "firstname": "vamshi",
 "lastname": "[email protected]",
 "dob": "2001-05-26",
"address" : "hyd
  }
]
  • GET /user/get/id: Get a user By the id:
{
 "id":1
 "firstname": "vamshi",
 "lastname": "[email protected]",
 "dob": "2001-05-26",
"address" : "hyd
}
  • PATCH /user/update/id: To Update a User. Requires the following JSON payload:
{
 "firstname": "vamshi",
 "lastname": "[email protected]"
}
  • Delete /user/delete/id: To delete a User. Requires the following JSON payload:
{
 "suc":"User deleted successfully"
}

Database image

DataBase

brainwired_assigment's People

Contributors

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