Code Monkey home page Code Monkey logo

nodejs-tasks's Introduction

Create a server on NodeJs and create two collections in mongodb (don’t use mongoose) Users and UsersProfile

Task 1

Users should have following keys

first name Last name email password (this should be encrypted using md5)

UsersProfile will have following keys

user_id (this will be the mongodbid object from users table) dob Mobile_no

  1. Write a code in node to insert 5 users. Take json of dummy data for users. Basically make an array of JSON of user data and loop over it and insert the data.
  2. It’s important to fill in user_id properly.

Task 2

After you do the above, i.e insert data into users and userprofile collection.

  1. Create a GET API in nodejs that will find the average age of all users and return the result.

  2. Create another GET API that will find and delete users who’s age is more than 25 yrs from the database, deleted data needs to be deleted from .

nodejs-tasks's People

Contributors

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